From 45d4cdaa4000ccd287618be7004438cebdb38719 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Sat, 15 Jun 2019 00:26:06 +0800 Subject: [PATCH] fix again! --- pkgadd | 2 +- pkgdel | 2 +- scratch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgadd b/pkgadd index dd5feb3..4169a27 100755 --- a/pkgadd +++ b/pkgadd @@ -284,7 +284,7 @@ if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then rm "$ROOT_DIR/$line" &>/dev/null done grep '/$' $TMP_PKGADD_RMLIST | tac | while read -r line; do - if ! grep -Rx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files; then + if ! grep -Rqx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files; then [ "$VERBOSE_INSTALL" = yes ] && echo "- $line" rmdir "$ROOT_DIR/$line" &>/dev/null fi diff --git a/pkgdel b/pkgdel index d0609e0..5bf4845 100755 --- a/pkgdel +++ b/pkgdel @@ -175,7 +175,7 @@ while read -r line; do done < <(tac $INDEX_DIR/$name/.files | grep -v '/$') while read -r line; do - if grep -Rx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files; then + if grep -Rqx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files; then if [ -d "$ROOT_DIR/$line" ]; then [ "$VERBOSE_REMOVE" = yes ] && echo "- $line" rmdir "$ROOT_DIR/$line" diff --git a/scratch b/scratch index ec2e819..f9295c5 100755 --- a/scratch +++ b/scratch @@ -489,7 +489,7 @@ scratch_info() { scratch_trigger() { needroot "Run trigger" - if [ -z "$@" ]; then + if [[ -z "$@" ]]; then for i in trig_{1..12}; do eval $i=1 done