[Pm-utils] [PATCH 6/6] Syntax and correctness fixes.

Victor Lowther victor.lowther at gmail.com
Mon Mar 17 17:35:51 PDT 2008


When doing > string comparisons, you have to escape >.
---
 pm/pm-functions.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index a45967a..ec1d805 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -146,8 +146,8 @@ run_hooks() {
 		do [ -O "$f" ] && echo ${f##*/} ; done | $sort | uniq) ;
 	do
 		# Skip any hooks we did not run when running going forward. 
-		[ "$3" -a "$LAST_HOOK" -a "$base" > "$LAST_HOOK" ] && {
-			log "Skipping hook "$base"; continue; }
+		[ "$3" ] && [ "$LAST_HOOK" ] && [ "$base" \> "$LAST_HOOK" ] && {
+			log "Skipping hook $base"; continue; }
 		if [ -f "$syshooks/$base" ]; then
 			hook="$syshooks/$base"
 		elif [ -f "$phooks/$base" ]; then
-- 
1.5.4.3



More information about the Pm-utils mailing list