From d7321ee4d7a05b449573864c588d39a04a72ab21 Mon Sep 17 00:00:00 2001 From: KrosFire Date: Sat, 21 Dec 2024 18:08:38 +0100 Subject: [PATCH] Added uinstall script --- dist-workspace.toml | 2 +- uninstall.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 uninstall.sh diff --git a/dist-workspace.toml b/dist-workspace.toml index 36f99d23..8d860bfe 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -18,6 +18,6 @@ install-path = "CARGO_HOME" # Whether to install an updater program install-updater = true # Extra static files to include in each App (path relative to this Cargo.toml's dir) -include = ["std", "assets"] +include = ["std", "assets", "uninstall.sh"] # Success installation message custom-success-msg = "Amber has been installed successfully. 🎉\n> Now you can use amber by typing `amber` in your terminal." diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 00000000..2924258b --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,14 @@ +#!/bin/bash +amber_path="./link.sh" + +if [ -z "$amber_path" ]; then + echo "Amber is not in \$PATH." + exit 1 +fi + +amber_installation_dir=$(dirname "$(readlink -f "$amber_path")") + +echo "Uninstalling Amber..." +rm -rf $amber_path +rm -rf $amber_installation_dir +echo "Amber uninstalled. See you later, 🐊"