From 89bcec8a606f60d303f52ae941cdbe84fac87ae5 Mon Sep 17 00:00:00 2001 From: remittor Date: Fri, 26 Dec 2025 15:45:20 +0300 Subject: [PATCH] updater: Fix files renaming --- zapret/update-pkg.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zapret/update-pkg.sh b/zapret/update-pkg.sh index c241e21..2037363 100755 --- a/zapret/update-pkg.sh +++ b/zapret/update-pkg.sh @@ -345,7 +345,7 @@ if [ "$opt_update" != "" ]; then fi fi ZAP_PKG_DIR=/tmp/zapret_pkg - rm -rf $ZAP_PKG_DIR + rm -rf $ZAP_PKG_DIR 2>/dev/null ZAP_PKG_HDRS=$( curl -s -I -L --max-time $CURL_TIMEOUT -H "$CURL_HEADER2" "$ZAP_PKG_URL" ) ZAP_PKG_SIZE=$( echo "$ZAP_PKG_HDRS" | grep -i 'content-length: ' | tail -n1 | awk '{print $2}' | tr -d '\r' ) echo "Downloded ZIP-file size = $ZAP_PKG_SIZE bytes" @@ -371,16 +371,16 @@ if [ "$opt_update" != "" ]; then return 218 fi unzip -q "$ZAP_PKG_FN" -d $ZAP_PKG_DIR - rm -f "$ZAP_PKG_FN" + rm -f "$ZAP_PKG_FN" 2>/dev/null if [ "$PKG_MGR" = "apk" ]; then if [ ! -d "$ZAP_PKG_DIR/apk" ]; then echo "ERROR: APK-files not founded" return 221 fi - rm -f "$ZAP_PKG_DIR/*.ipk" - mv "$ZAP_PKG_DIR/apk/*" "$ZAP_PKG_DIR/" + rm -f $ZAP_PKG_DIR/*.ipk 2>/dev/null + mv $ZAP_PKG_DIR/apk/* $ZAP_PKG_DIR/ else - rm -rf "$ZAP_PKG_DIR/apk" + rm -rf $ZAP_PKG_DIR/apk 2>/dev/null fi ZAP_PKG_LIST=$( ls -1 "$ZAP_PKG_DIR" ) echo "------ Downloaded packages:"