File: compile

package info (click to toggle)
gimp-texturize 3.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 380 kB
  • sloc: cpp: 2,321; ansic: 611; python: 30; makefile: 5; xml: 4
file content (31 lines) | stat: -rwxr-xr-x 1,024 bytes parent folder | download
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
31
#!/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 + "/")
    if not os.path.exists(PLUGINS_DIR_3):
        os.system("mkdir -p " + PLUGINS_DIR_3)
    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()