From 533dd8d68d6a633342602a0b16cebbaf97b66ae2 Mon Sep 17 00:00:00 2001 From: Slug-Boi Date: Wed, 22 Jan 2025 19:34:05 +0100 Subject: [PATCH] chore: add auto remove script code to cleanup if the directory is not in src tree --- installer/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installer/install.sh b/installer/install.sh index fdd15f7..bfa1e76 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -8,6 +8,11 @@ __cleanup () if [ -n "$file" ]; then rm $file 2>/dev/null fi + base=$(basename $(pwd)) + parent=$(dirname $(pwd)) + if [ "$base" != "installer" ] || [ "$parent" != "aion-cli" ]; then + rm install.sh 2>/dev/null + fi } trap __cleanup EXIT