From 52b91af97cdd6b8b0ad65be31980176a5773b8de Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Fri, 8 Aug 2025 17:43:26 -0600 Subject: [PATCH] powershell webhook, pyenv nistaller, changes to install_script.sh --- customscripts/install_script.sh | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/customscripts/install_script.sh b/customscripts/install_script.sh index 830aacf..c7f5162 100644 --- a/customscripts/install_script.sh +++ b/customscripts/install_script.sh @@ -38,23 +38,37 @@ if [[ -d "$tmpDir" ]]; then rm -rf "$tmpDir" fi +# clean up any exisiting repo dir if [[ -d "$finalDir" ]]; then echo "Cleaning Up Existing $finalDir" rm -rf "$finalDir" fi +# ddownload repo echo "Cloning Repo $gitRepo" git clone $gitRepo $tmpDir --single-branch --depth 1 +# put the customscripts dir into place echo "Placing in $finalDir" -mv "$tmpDir/customscripts" "$finalDir" +sudo mv "$tmpDir/customscripts" "$finalDir" +# configure webhook +echo "Enter Discord Webhook URL" +read url +echo "Enter Tag to Notify" +read tag +sudo bash -c "echo '$url' > $finalDir/webhook.txt" +sudo bash -c "echo '$tag' > $finalDir/tag.txt" + +# fix ownership echo "Changing ownership of $finalDir to $username:$username recursively" -chown -R $username:$username "$finalDir" +sudo chown -R $username:$username "$finalDir" +# fix perms echo "Setting perms of $finalDir and contents to 775" -chmod -R 775 "$finalDir" +sudo chmod -R 775 "$finalDir" +# check if $finalDir is in $rcfile grep -q $finalDir $rcfile pathgrep=$? @@ -65,14 +79,7 @@ else echo -e "\n\n# automatically added by customscripts installer\nexport PATH=\"\$PATH:$finalDir\"" >> "$rcfile" fi -# configure webhook -echo "Enter Discord Webhook URL" -read url -echo "Enter Tag to Notify" -read tag -sudo bash -c "echo '$url' > $finalDir/webhook.txt" -sudo bash -c "echo '$tag' > $finalDir/tag.txt" - +# cleanup sudo rm -f $finalDir/install_script.sh echo -e "\n\nDone! Restart shell:\n\texec \"\$SHELL\"\n\n" \ No newline at end of file