Convert build scripts to Python #31

Merged
MartinFouilleul merged 24 commits from build-python into main 2023-08-08 09:38:44 +00:00
1 changed files with 13 additions and 13 deletions
Showing only changes of commit 9a2c4d8876 - Show all commits

View File

@ -546,9 +546,9 @@ def yeet(path):
def install(args): def install(args):
if not args.no_confirm: dest = os.path.expanduser(os.path.join("~", ".orca"))
dest = os.path.expanduser(os.path.join("~", ".orca"))
if not args.no_confirm:
print("The Orca command-line tools will be installed to your home directory in:") print("The Orca command-line tools will be installed to your home directory in:")
print(dest) print(dest)
print() print()
@ -561,15 +561,15 @@ def install(args):
else: else:
print("Please enter \"yes\" or \"no\" and press return.") print("Please enter \"yes\" or \"no\" and press return.")
bin_dir = os.path.join(dest, "bin") bin_dir = os.path.join(dest, "bin")
yeet(bin_dir) yeet(bin_dir)
shutil.copytree("scripts", os.path.join(bin_dir, "sys_scripts")) shutil.copytree("scripts", os.path.join(bin_dir, "sys_scripts"))
shutil.copy("orca", bin_dir) shutil.copy("orca", bin_dir)
# TODO: Customize these instructions for Windows # TODO: Customize these instructions for Windows
print() print()
print("Orca has been installed. Make sure the Orca tools are on your PATH by adding the") print("The Orca tools have been installed. Make sure the Orca tools are on your PATH by")
print("following to your shell config:") print("adding the following to your shell config:")
print() print()
print(f"export PATH=\"{bin_dir}:$PATH\"") print(f"export PATH=\"{bin_dir}:$PATH\"")
print() print()