Skip to content

Commit

Permalink
chore: add auto remove script code to cleanup if the directory is not…
Browse files Browse the repository at this point in the history
… in src tree
  • Loading branch information
Slug-Boi committed Jan 22, 2025
1 parent 42467dd commit 533dd8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions installer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 533dd8d

Please sign in to comment.