#!/usr/bin/env python3
import os
import argparse

def get_arguments():
    parser = argparse.ArgumentParser()

    # argument groups can have their tickers combined (ie -su)
    bools = parser.add_argument_group()

    # REQUIRED string value
    parser.add_argument('script_name', help="Name of the script")

    bools.add_argument('-nx', dest="make_executable", action="store_false",
                       help="By default, we make the script executable. Use this ticker to not make the script executable")

    args = parser.parse_args()

    return args


    
if __name__ == "__main__":
    args = get_arguments()
    script_name = args.script_name
    os.system(f"sudo -u steven cp $HOME/bin/python-script-template $HOME/bin/{script_name}")

    if args.make_executable:
        os.system(f"sudo -u steven chmod u+x $HOME/bin/{script_name}")



