From 099b526d775da64d49123ee0b5a48d3609f2fbf0 Mon Sep 17 00:00:00 2001 From: Takaya Saeki Date: Mon, 4 Jul 2022 23:34:06 +0900 Subject: [PATCH] installer: Fix the error which occurred when RELEASE_FILE is the same as the destination (#59) This PR fixes the installer crashing when RELEASE_FILE is the same location as opt_distrod.tar.gz --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1a4ba39..0aeca22 100755 --- a/install.sh +++ b/install.sh @@ -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