diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2004-02-03 12:11:04 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2004-02-03 12:11:04 +0000 |
commit | f74060c4f2131a394cf57663cd44646db30bccc1 (patch) | |
tree | 65cf9364d2275b0fe62e4e2ed7e3da03d3a0fb01 | |
parent | b525508472d3c3dbf4970b209d31ed1dd6e45edc (diff) | |
download | quilt-f74060c4f2131a394cf57663cd44646db30bccc1.tar.gz |
- Add --quiltrc={rcfile|-} option. Remove some superfluous quoting
from quilt wrapper.
- Extra tests in `quilt refresh' did not check if the old patch
was missing.
-rw-r--r-- | bin/quilt.in | 32 | ||||
-rw-r--r-- | quilt.changes | 8 | ||||
-rw-r--r-- | quilt/refresh.in | 5 | ||||
-rw-r--r-- | scripts/patchfns.in | 12 |
4 files changed, 38 insertions, 19 deletions
diff --git a/bin/quilt.in b/bin/quilt.in index fef1e13..10738a1 100644 --- a/bin/quilt.in +++ b/bin/quilt.in @@ -7,6 +7,7 @@ # See the COPYING and AUTHORS files for more details. export TEXTDOMAIN=quilt +export QUILTRC=$HOME/.quiltrc usage() { @@ -44,23 +45,31 @@ quilt_commands() } BASH_OPTS= -for arg in "$@" +while [ $# -ne 0 ] do - case $arg in + case $1 in [^-]*) if [ -z "$command" ] then - command="$arg" + command=$1 else - args[${#args[@]}]="$arg" + args[${#args[@]}]=$1 fi ;; + # Use a resource file other than ~/.quiltrc + --quiltrc=*) + QUILTRC=${1#--quiltrc=} + [ "$QUILTRC" = - ] && unset QUILTRC ;; + --quiltrc) + QUILTRC=$2 + [ "$QUILTRC" = - ] && unset QUILTRC + shift ;; + # Trace execution of commands --trace) - # Trace execution of commands BASH_OPTS=-x ;; - *) - args[${#args[@]}]="$arg" ;; + args[${#args[@]}]=$1 ;; esac + shift done if ! [ -f "@QUILT@/$command" -a -x "@QUILT@/$command" ] @@ -71,10 +80,11 @@ then do case "$arg" in $command*) - commands[${#commands[@]}]="$arg" + commands[${#commands[@]}]=$arg ;; esac done + unset arg fi if [ ${#commands[@]} -eq 0 ] @@ -82,7 +92,7 @@ then usage elif [ ${#commands[@]} -eq 1 ] then - command="${commands[0]}" + command=${commands[0]} unset commands else echo "$command :" "${commands[@]}" >&2 @@ -91,7 +101,7 @@ then fi set -- "${args[@]}" -unset arg args +unset args -#. @QUILT@/$command +#source @QUILT@/$command @BASH@ $BASH_OPTS -c ". @QUILT@/$command" "quilt ${command##*/}" "$@" diff --git a/quilt.changes b/quilt.changes index 9f1110d..e384262 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue Feb 3 12:58:49 CET 2004 - agruen@suse.de + +- Add --quiltrc={rcfile|-} option. Remove some superfluous quoting + from quilt wrapper. +- Extra tests in `quilt refresh' did not check if the old patch + was missing. + +------------------------------------------------------------------- Mon Feb 2 14:04:31 CET 2004 - agruen@suse.de - Fix test for bash in configure.ac. diff --git a/quilt/refresh.in b/quilt/refresh.in index b36d774..385cc55 100644 --- a/quilt/refresh.in +++ b/quilt/refresh.in @@ -176,13 +176,14 @@ then die 1 fi -if @DIFF@ -q $patch_file $tmpfile2 > /dev/null +if [ -e $patch_file ] && \ + @DIFF@ -q $patch_file $tmpfile2 > /dev/null then echo $"Patch $patch is unchanged" exit 0 fi -if ( [ "$QUILT_BACKUP" = yes ] && \ +if ( [ "$QUILT_BACKUP" = yes -a -e $patch_file ] && \ ! cp $patch_file $patch_file~ ) || \ ! cat_to_file $patch_file < $tmpfile2 then diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 1ec7ce4..d3e5d25 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -7,19 +7,19 @@ # # See the COPYING and AUTHORS files for more details. -ORIINAL_LANG=$LANG +ORIGINAL_LANG=$LANG export LANG=POSIX export TEXTDOMAIN=quilt -if [ -e $HOME/.quiltrc ] -then - . $HOME/.quiltrc -fi - : ${QUILT_PATCHES:=patches} : ${QUILT_PC:=.pc} +if [ -e "$QUILTRC" ] +then + source "$QUILTRC" +fi + # # If the working directory does not contain a $QUILT_PATCHES directory, # quilt searches for its base directory up the directory tree. If no |