From 2f157c0eb36c01d77f4b3eb0bae5960048bc1982 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Tue, 3 Sep 2024 23:44:38 +0800 Subject: fix updateconf script --- updateconf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'updateconf') diff --git a/updateconf b/updateconf index 60475e1..c454a1c 100755 --- a/updateconf +++ b/updateconf @@ -12,14 +12,14 @@ command -v $EDITOR >/dev/null || { exit 1 } -spkgnew=$(find /etc -regextype posix-extended -regex ".+\.new" 2> /dev/null) +pkgnew=$(find /etc -type f -name "*.new" 2> /dev/null) -[ "$spkgnew" ] || { +[ "$pkgnew" ] || { echo "Nothing to do. Exiting..." exit 0 } -for file in $spkgnew; do +for file in $pkgnew; do currentfile=${file%.*} if [ ! -e "$currentfile" ]; then echo "Remove '$file', '$currentfile' not exist." -- cgit v1.2.3