From a69543ab82f284f561f923815112ab3a4eaab1f8 Mon Sep 17 00:00:00 2001 From: SandupaTech <93241017+SandupaTech@users.noreply.github.com> Date: Tue, 30 Nov 2021 17:20:48 +0530 Subject: [PATCH 1/2] Change pacman -Syu to -Syy --- install-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-release.sh b/install-release.sh index 6717006..0e87e39 100755 --- a/install-release.sh +++ b/install-release.sh @@ -210,7 +210,7 @@ identify_the_operating_system_and_architecture() { PACKAGE_MANAGEMENT_REMOVE='zypper remove' package_provide_tput='ncurses-utils' elif [[ "$(type -P pacman)" ]]; then - PACKAGE_MANAGEMENT_INSTALL='pacman -Syu --noconfirm' + PACKAGE_MANAGEMENT_INSTALL='pacman -Syy --noconfirm' PACKAGE_MANAGEMENT_REMOVE='pacman -Rsn' package_provide_tput='ncurses' elif [[ "$(type -P emerge)" ]]; then From 34df513a033afa2c64e4fa2353185c56e84a1ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=81=E3=82=BB?= <123655015+chise0713@users.noreply.github.com> Date: Mon, 18 Dec 2023 23:15:29 +0800 Subject: [PATCH 2/2] Check time format --- install-release.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install-release.sh b/install-release.sh index 0e87e39..786900c 100755 --- a/install-release.sh +++ b/install-release.sh @@ -300,6 +300,10 @@ judgment_parameters() { N_UP_SERVICE='1' ;; '--logrotate') + if grep -qE '\b([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\b' <<< "$2";then + echo "error: Wrong format of time, it should be in the format of 12:34:56, under 12:00:00 should be start with 0, e.g. 01:23:45." + exit 1 + fi LOGROTATE='1' LOGROTATE_TIME="$2" shift @@ -795,7 +799,8 @@ show_help() { echo " --no-update-service Don't change service files if they are exist" echo " --without-geodata Don't install/update geoip.dat and geosite.dat" echo " --without-logfiles Don't install /var/log/xray" - echo " --logrotate [time] Install with logrotate. [time] can be in the format of 12:34:56" + echo " --logrotate [time] Install with logrotate." + echo " [time] need be in the format of 12:34:56, under 12:00:00 should be start with 0, e.g. 01:23:45." echo ' install-geodata:' echo ' -p, --proxy Download through a proxy server' echo ' remove:'