29 lines
619 B
Lua
Executable file
29 lines
619 B
Lua
Executable file
#!/usr/bin/lua
|
|
|
|
print("Building pack...")
|
|
os.execute("cargo build --release")
|
|
os.execute("cp target/release/pack .")
|
|
print("Done!\n\n")
|
|
|
|
stdo = io.open("/dev/stdout", "w")
|
|
stdo:write("Setup environment? (requires root) [Y/n]: ")
|
|
io.close(stdo)
|
|
input = io.read()
|
|
if input ~= "n" then
|
|
os.execute("scripts/setup.sh")
|
|
else
|
|
print("Goodbye!\n")
|
|
end
|
|
|
|
print()
|
|
|
|
print("Add /usr/pack/bin/ to path? [Y/n]:")
|
|
input = io.read()
|
|
if input ~= "n" then
|
|
print("Enter the name of the file to append to (full path):")
|
|
file = io.read()
|
|
f = io.open(file, "a")
|
|
f:write("export PATH=$PATH:/usr/pack/bin\n")
|
|
else
|
|
print("Goodbye!\n")
|
|
end
|