uninstall script updated
This commit is contained in:
parent
08c18871c1
commit
94e82f3b6a
|
@ -1,7 +1,58 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
main(){
|
main(){
|
||||||
check_arg $1
|
check_arg $1
|
||||||
|
SCR_PATH="$HOME/.photoshopCCV19"
|
||||||
|
CACHE_PATH="$HOME/.cache/photoshopCCV19"
|
||||||
|
|
||||||
|
CMD_PATH="/usr/local/bin/photoshop"
|
||||||
|
ENTRY_PATH="/usr/share/applications/photoshop.desktop"
|
||||||
|
|
||||||
ask_question "you are uninstalling photoshop cc v19 are you sure?" "N"
|
ask_question "you are uninstalling photoshop cc v19 are you sure?" "N"
|
||||||
|
if [ $result == "no" ];then
|
||||||
|
echo "Ok good Bye :)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#remove photoshop directory
|
||||||
|
if [ -d "$SCR_PATH" ];then
|
||||||
|
echo "remove photoshop directory..."
|
||||||
|
rm -rf "$SCR_PATH" || error "couldn't remove photoshop directory"
|
||||||
|
sleep 4
|
||||||
|
else
|
||||||
|
echo "photoshop directory Not Found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Unlink command
|
||||||
|
if [ -f "$CMD_PATH" ];then
|
||||||
|
echo "remove luncher command..."
|
||||||
|
sudo unlink "$CMD_PATH" || error "couln't remove luncher command"
|
||||||
|
else
|
||||||
|
echo "luncher command Not Found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#delete desktop entry
|
||||||
|
if [ -f "$ENTRY_PATH" ];then
|
||||||
|
echo "remove dekstop entry...."
|
||||||
|
sudo rm "$ENTRY_PATH" || error "couldn't remove desktop entry"
|
||||||
|
else
|
||||||
|
echo "desktop entry Not Found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#delete cache directoy
|
||||||
|
if [ -d "$CACHE_PATH" ];then
|
||||||
|
echo "all downloaded components are in cache directory and you can use them for photoshop installation next time without wasting internet traffic"
|
||||||
|
echo "your cache directory is $CACHE_PATH"
|
||||||
|
ask_question "would you delete cache directory?" "N"
|
||||||
|
if [ "$result" == "yes" ];then
|
||||||
|
rm -rf "$CACHE_PATH" || error "couldn't remove cache directory"
|
||||||
|
else
|
||||||
|
echo "nice, you can copy component data and use them later for photoshop installation"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "cache directory Not Found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
error(){
|
error(){
|
||||||
|
|
Loading…
Reference in New Issue