aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-09-03 23:44:38 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-09-03 23:44:38 +0800
commit2f157c0eb36c01d77f4b3eb0bae5960048bc1982 (patch)
tree13b95fa02c3ccafe40d7abd9c7429cf4a52b0584
parent1301d84c0cf6c991998288e65e904973700c04b0 (diff)
downloadautils-2f157c0eb36c01d77f4b3eb0bae5960048bc1982.tar.gz
autils-2f157c0eb36c01d77f4b3eb0bae5960048bc1982.zip
fix updateconf script
-rwxr-xr-xupdateconf6
1 files changed, 3 insertions, 3 deletions
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."