From dfcf7c204aac2b0d0855f34468493973a5cb3e02 Mon Sep 17 00:00:00 2001 From: Gary Palmer Jr Date: Sun, 14 Nov 2021 22:28:42 -0500 Subject: [PATCH] initial unistaller fixes for mac path and detection --- unixInstaller.sh | 4 ++-- unixuninstaller.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 unixuninstaller.sh diff --git a/unixInstaller.sh b/unixInstaller.sh index fcf3383..6df91b3 100644 --- a/unixInstaller.sh +++ b/unixInstaller.sh @@ -17,7 +17,7 @@ then fi echo "Downloading the executable..." -if [ $OSTYPE == *"darwin"* ] +if [ -z "${OSTYPE##*darwin*}" ] then curl -L -o ~/bin/packageless https://github.com/everettraven/packageless/releases/latest/download/packageless-macos else @@ -30,5 +30,5 @@ echo "Downloading packageless configuration file" curl -L -o ~/.packageless/config.hcl https://github.com/everettraven/packageless/releases/latest/download/config.hcl echo "Adding packageless to PATH by adding to: ~/."$shell"rc" -echo "export PATH=\$PATH:~/bin/" >> $HOME"/."$shell"rc" +echo "export PATH=\$PATH:~/bin" >> $HOME"/."$shell"rc" echo "For changes to take effect, please restart your terminal" \ No newline at end of file diff --git a/unixuninstaller.sh b/unixuninstaller.sh new file mode 100644 index 0000000..9f422b6 --- /dev/null +++ b/unixuninstaller.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo "-------------------------" +echo "- packageless uninstall -" +echo "-------------------------" +echo "" +echo "removing packageless binary" +rm -f ~/bin/packageless + +echo "removing .packageless folder" +rm -f -r ~/.packageless + +#need to add a section here to clean up the rc file for the shell + +echo "removal complete" +echo "" \ No newline at end of file