pack/scripts/build

30 lines
619 B
Plaintext
Raw Normal View History

2019-09-03 21:47:27 +00:00
#!/usr/bin/lua
print("Building pack...")
os.execute("cargo build --release")
os.execute("cp target/release/pack .")
print("Done!\n\n")
2019-09-04 23:04:18 +00:00
stdo = io.open("/dev/stdout", "w")
stdo:write("Setup environment? (requires root) [Y/n]: ")
io.close(stdo)
2019-09-03 21:47:27 +00:00
input = io.read()
2019-09-04 23:04:18 +00:00
if input ~= "n" then
2019-09-03 21:47:27 +00:00
os.execute("scripts/setup.sh")
else
print("Goodbye!\n")
end
2019-09-04 23:04:18 +00:00
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