mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
HackStudio: Add Project::project_is_serenity() function
This commit is contained in:
parent
95545648bd
commit
3afd17db9d
2 changed files with 8 additions and 0 deletions
|
@ -59,4 +59,11 @@ String Project::to_absolute_path(String const& path) const
|
|||
return LexicalPath { String::formatted("{}/{}", m_root_path, path) }.string();
|
||||
}
|
||||
|
||||
bool Project::project_is_serenity() const
|
||||
{
|
||||
// FIXME: Improve this heuristic
|
||||
// Running "Meta/serenity.sh copy-src" installs the serenity repository at this path in the home directory
|
||||
return m_root_path.ends_with("Source/serenity");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ public:
|
|||
|
||||
void for_each_text_file(Function<void(const ProjectFile&)>) const;
|
||||
String to_absolute_path(String const&) const;
|
||||
bool project_is_serenity() const;
|
||||
|
||||
private:
|
||||
explicit Project(const String& root_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue