From 9d13c6ce3acc084c34dab66d075dae3eb2fff99e Mon Sep 17 00:00:00 2001 From: Raj Nandan Sharma Date: Wed, 29 May 2024 20:57:33 +0530 Subject: [PATCH] added uninstall script --- uninstall.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..b584c37 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,15 @@ +# Locate the binary directory +GOBIN=$(go env GOBIN) +if [ -z "$GOBIN" ]; then + GOBIN=$(go env GOPATH)/bin +fi + +# Remove the okgit binary +rm "$GOBIN/okgit" + +# Verify uninstallation +if ! command -v okgit &> /dev/null; then + echo "okgit successfully uninstalled" +else + echo "Failed to uninstall okgit" +fi