change: Updated push_script_to.sh

This commit is contained in:
Sayantan Santra 2023-05-29 20:08:48 -05:00
parent f22aa445d7
commit 73bcd1ee3c
Signed by: SinTan1729
GPG Key ID: EB3E68BFBA25C85F
1 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# this is a script to push scripts from the folder with git # this is a script to push scripts from the folder with git
# to actual locations where I use them # to actual locations where I use them
@ -18,8 +18,7 @@ fi
[ -z "$2" ] && echo "Provide destination(s) or pass --help to see syntax" && exit [ -z "$2" ] && echo "Provide destination(s) or pass --help to see syntax" && exit
for i in "${@:2}" for i in "${@:2}"; do
do
if [ "$i" == "personal_script_dir" ]; then if [ "$i" == "personal_script_dir" ]; then
dest="/home/sintan/.local/bin/personal/" dest="/home/sintan/.local/bin/personal/"
echo Copying to "$dest"... echo Copying to "$dest"...
@ -55,6 +54,8 @@ do
echo Making it executable... echo Making it executable...
sudo chmod +x "$dest$(basename "$1")" sudo chmod +x "$dest$(basename "$1")"
else echo "Unrecognized destination: $i" else
echo "Unrecognized destination: $i"
echo "Available destinations are: personal_script_dir, cron_daily, cron_weekly, cron_monthly, root_scripts"
fi fi
done done