From 10af8ee01acc90c1ec2aab0bba254a5e2d3cd396 Mon Sep 17 00:00:00 2001 From: Mikhail Grigorev Date: Sun, 28 Sep 2025 16:39:53 +0500 Subject: [PATCH] Fixed self destroy --- update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 36b5a49c..35763969 100755 --- a/update.sh +++ b/update.sh @@ -14,6 +14,7 @@ while [ -h "$b_source" ]; do [[ $b_source != /* ]] && b_source="$b_dir/$b_source" done cur_dir="$(cd -P "$(dirname "$b_source")" && pwd)" +script_name=$(basename "$0") # Check command exist function _command_exists() { @@ -63,7 +64,7 @@ arch() { armv6* | armv6) echo 'armv6' ;; armv5* | armv5) echo 'armv5' ;; s390x) echo 's390x' ;; - *) rm -f ${cur_dir}/update.sh && _fail "Unsupported CPU architecture!" ;; + *) echo -e "${red}Unsupported CPU architecture!${plain}" && rm -f "${cur_dir}/${script_name}" >/dev/null 2>&1 ;; esac }