-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHulkfile
More file actions
34 lines (26 loc) · 932 Bytes
/
Hulkfile
File metadata and controls
34 lines (26 loc) · 932 Bytes
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
32
33
34
import Hulk.Facilities.IO
import Hulk.Facilities.Osx.IO
class Project:
BOOT_PATH = "./bootstrap/"
EXECUTABLE = BOOT_PATH + "Hulk.exe"
TARGET_PATH = "/usr/local/hulk/"
SCRIPT_FILE = "/usr/local/bin/hulk"
SCRIPT_CONTENT = """#!/bin/sh
mono /usr/local/hulk/Hulk.exe "$@"
"""
def install():
"""Install hulk executable and dependencies to '/usr/local/hulk/'"""
if exist(EXECUTABLE):
assertTargetPathExists(TARGET_PATH)
print "Copying executable and dependencies to: ${TARGET_PATH}"
copy(fileset("${BOOT_PATH}*.exe"), TARGET_PATH, true)
copy(fileset("${BOOT_PATH}*.dll"), TARGET_PATH, true)
print "Adding hulk script..."
writeTextFile(SCRIPT_FILE, SCRIPT_CONTENT)
changeMod(SCRIPT_FILE, 775)
else:
print "Hulk executable not found at ${BOOT_PATH} !!"
private def assertTargetPathExists(path as string):
if not exist(path): makeDir(path)
def update():
raise "Not implemented"