Index: quilt-0.48/bin/quilt.in =================================================================== --- quilt-0.48.orig/bin/quilt.in 2009-07-07 12:44:06.000000000 +0000 +++ quilt-0.48/bin/quilt.in 2009-07-08 10:19:40.000000000 +0000 @@ -14,14 +14,6 @@ export address@hidden@ : ${QUILT_DIR="address@hidden@"} ${QUILT_LIB="address@hidden@"} export QUILT_DIR QUILT_LIB -if [ -z "$QUILTRC" ] -then - for QUILTRC in $HOME/.quiltrc /etc/quilt.quiltrc; do - [ -e $QUILTRC ] && break - done - export QUILTRC -fi - # Support compatibility layer if [ -d $QUILT_DIR/compat ] then @@ -46,11 +38,10 @@ Global options: Runs the command in bash trace mode (-x). For internal debugging. --quiltrc file - Use the specified configuration file instead of ~/.quiltrc (or - /etc/quilt.quiltrc if ~/.quiltrc does not exist). See the pdf - documentation for details about its possible contents. The - special value \"-\" causes quilt not to read any configuration - file. + Use the specified configuration file instead of \"\$QUILTRC\", or + \"/etc/quilt.quiltrc\", \"~/.quiltrc\", and \".pc/quiltrt\". See the + pdf documentation for details about its possible contents. The + special value \"-\" causes quilt not to read any configuration file. --version Print the version number and exit immediately." @@ -89,11 +80,11 @@ do # Use a resource file other than ~/.quiltrc --quiltrc=*) QUILTRC=${1#--quiltrc=} - [ "$QUILTRC" = - ] && unset QUILTRC ;; + if [ "$QUILTRC" = "-" ]; then QUILTRC=""; fi ;; --quiltrc) QUILTRC=$2 - [ "$QUILTRC" = - ] && unset QUILTRC - shift ;; + shift + if [ "$QUILTRC" = "-" ]; then QUILTRC=""; fi ;; # Trace execution of commands --trace*) BASH_OPTS="${BASH_OPTS:+$BASH_OPTS }-x" Index: quilt-0.48/quilt/scripts/patchfns.in =================================================================== --- quilt-0.48.orig/quilt/scripts/patchfns.in 2009-07-07 12:55:18.000000000 +0000 +++ quilt-0.48/quilt/scripts/patchfns.in 2009-07-08 10:27:48.000000000 +0000 @@ -32,16 +32,17 @@ fi unset CDPATH shopt -s dotglob -if [ -e "$QUILTRC" ] +if [ -z "${QUILTRC+set}" ] then - source "$QUILTRC" -fi - -# Add default arguments for this command -if [ -n "$QUILT_COMMAND" ]; then - args="QUILT_$(echo $QUILT_COMMAND | tr a-z A-Z)_ARGS" - eval set -- ${!args} \"address@hidden" - unset args + if [ -e "/etc/quilt.quiltrc" ] + then + source "/etc/quilt.quiltrc" + fi + + if [ -e "$HOME/.quiltrc" ] + then + source "$HOME/.quiltrc" + fi fi # ======================================================== @@ -1005,6 +1006,19 @@ then unset basedir down fi +: "${QUILTRC=$QUILT_PC/quiltrc}" +if [ -e "$QUILTRC" ] +then + source "$QUILTRC" +fi + +# Add default arguments for this command +if [ -n "$QUILT_COMMAND" ]; then + args="QUILT_$(echo $QUILT_COMMAND | tr a-z A-Z)_ARGS" + eval set -- ${!args} \"address@hidden" + unset args +fi + : ${QUILT_SERIES:=series} if [ "${QUILT_SERIES:0:1}" = / ]