powershell webhook, pyenv nistaller, changes to install_script.sh

This commit is contained in:
2025-08-08 17:43:26 -06:00
parent d3d58a71a3
commit 52b91af97c
+18 -11
View File
@@ -38,23 +38,37 @@ if [[ -d "$tmpDir" ]]; then
rm -rf "$tmpDir" rm -rf "$tmpDir"
fi fi
# clean up any exisiting repo dir
if [[ -d "$finalDir" ]]; then if [[ -d "$finalDir" ]]; then
echo "Cleaning Up Existing $finalDir" echo "Cleaning Up Existing $finalDir"
rm -rf "$finalDir" rm -rf "$finalDir"
fi fi
# ddownload repo
echo "Cloning Repo $gitRepo" echo "Cloning Repo $gitRepo"
git clone $gitRepo $tmpDir --single-branch --depth 1 git clone $gitRepo $tmpDir --single-branch --depth 1
# put the customscripts dir into place
echo "Placing in $finalDir" 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" 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" 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 grep -q $finalDir $rcfile
pathgrep=$? pathgrep=$?
@@ -65,14 +79,7 @@ else
echo -e "\n\n# automatically added by customscripts installer\nexport PATH=\"\$PATH:$finalDir\"" >> "$rcfile" echo -e "\n\n# automatically added by customscripts installer\nexport PATH=\"\$PATH:$finalDir\"" >> "$rcfile"
fi fi
# configure webhook # cleanup
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"
sudo rm -f $finalDir/install_script.sh sudo rm -f $finalDir/install_script.sh
echo -e "\n\nDone! Restart shell:\n\texec \"\$SHELL\"\n\n" echo -e "\n\nDone! Restart shell:\n\texec \"\$SHELL\"\n\n"