-
Notifications
You must be signed in to change notification settings - Fork 5
/
compile
executable file
·30 lines (25 loc) · 958 Bytes
/
compile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/python
import os
BUILD_DIR = "build"
PLUGINS_DIR_2 = os.path.expanduser("~/.config/GIMP/2.10/plug-ins")
PLUGINS_DIR_3 = os.path.expanduser("~/.config/GIMP/3.0/plug-ins")
def main():
if not os.path.exists(BUILD_DIR):
print("Setting up...")
os.system("meson setup " + BUILD_DIR)
os.chdir(BUILD_DIR)
print("Compiling...")
os.system("meson compile")
if not os.path.exists(PLUGINS_DIR_2):
os.system("mkdir -p " + PLUGINS_DIR_2)
print("Copying the 'texturize' binary to " + PLUGINS_DIR_2 + "...")
os.system("cp texturize " + PLUGINS_DIR_2 + "/")
# Optional for now
if os.path.exists(PLUGINS_DIR_3):
subdir = os.path.join(PLUGINS_DIR_3, "texturize")
if not os.path.exists(subdir):
os.system("mkdir " + subdir)
print("Copying the 'texturize' binary to " + subdir + "...")
os.system("cp texturize " + subdir)
if __name__ == "__main__":
main()