Skip to content

Commit

Permalink
feat: add installation script
Browse files Browse the repository at this point in the history
sreyasaju committed Oct 24, 2022

Unverified

This user has not yet uploaded their public signing key.
1 parent c772c6e commit 7ccaef4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
# A Bash Script to uninstall zap

# Error Handling
# Pipefall instead of error checks to retain original error
set -euo pipefail

chmod +x uninstall.sh
echo
echo "#########################"
echo
echo '~ ZAP Uninstaller ~'
echo
echo "#########################"
echo

# Config
REPO="srevinsaju/zap"

# Uninstallation

if [ "$EUID" -eq 0 ]; then
echo [~] Script is running as root.
echo
echo [~] Uninstalling System-Wide
sudo rm /usr/local/bin/zap
# Done
echo [~] Done....
else
echo [~] Script is not running as root user
echo
echo '[~] Uninstalling Locally from ~/.local/bin/'
rm ~/.local/bin/zap
# Done
echo [~] Done....
fi

# Installation Complete
echo
echo [~] Uninstallation Complete....

0 comments on commit 7ccaef4

Please sign in to comment.