From: Stephen Rothwell Date: Sun, 6 Apr 2008 23:53:23 +0000 (+1000) Subject: Use '$' for the command promt in logging X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=675cd13dceb37a55a2c67a1762c7034ccab30c6b;p=next-scripts Use '$' for the command promt in logging Print the specified BASE instead of the resolved one. --- diff --git a/update_trees b/update_trees index 8465a94..a4ba9a9 100755 --- a/update_trees +++ b/update_trees @@ -11,7 +11,7 @@ log() execute() { - log "#" $@ + log "$" $@ $@ 2>&1 | tee -a ../quilt-import.log } @@ -25,16 +25,17 @@ for name in $quilters; do else base=$(sed -n 's/^[# ]*BASE[ ]*\(.*\)[ ]*$/\1/p' "$sfile") fi + rbase="$base" case "$base" in - *-git[0-9]*) base=$(wget -q -O - "http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-${base}.id") + *-git[0-9]*) rbase=$(wget -q -O - "http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-${base}.id") ;; - commit*) base=$(expr "$base" : "commit[ ]*\(.*\)") + commit*) rbase=$(expr "$base" : "commit[ ]*\(.*\)") ;; - [0-9]*.*) base="v$base" + [0-9]*.*) rbase="v$base" ;; esac log "Importing $name based on $base" - git rev-list -n 1 "$base" -- >/dev/null 2>&1 || { + git rev-list -n 1 "$rbase" -- >/dev/null 2>&1 || { log "Unknown BASE" continue } @@ -53,7 +54,7 @@ for name in $quilters; do } execute git branch -D "quilt/$name" - execute git checkout -b "quilt/$name" "$base" || sh -i || { + execute git checkout -b "quilt/$name" "$rbase" || sh -i || { [ -f "$sfile.orig" ] && mv -f $sfile.orig $sfile exit 1 }