Skip to content

Commit

Permalink
installer: Fix the error which occurred when RELEASE_FILE is the same…
Browse files Browse the repository at this point in the history
… as the destination (#59)

This PR fixes the installer crashing when RELEASE_FILE is the same location as opt_distrod.tar.gz
  • Loading branch information
nullpo-head authored Jul 4, 2022
1 parent fd9bbdc commit 099b526
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ update () {

get_release_file() {
if [ -n "$RELEASE_FILE" ]; then
cp "$RELEASE_FILE" opt_distrod.tar.gz
if [ "$(realpath "$RELEASE_FILE")" != "$(realpath opt_distrod.tar.gz)" ]; then
cp "$RELEASE_FILE" opt_distrod.tar.gz
fi
else
curl -L -O "${LATEST_RELEASE_URL}"
fi
Expand Down

0 comments on commit 099b526

Please sign in to comment.