* gcc_update (apply_patch): Properly quote $1.

From-SVN: r96705
This commit is contained in:
Andreas Schwab 2005-03-18 22:43:26 +00:00 committed by Andreas Schwab
parent c51a1ba9d9
commit d028e149ad
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2005-03-18 Andreas Schwab <schwab@suse.de>
* gcc_update (apply_patch): Properly quote $1.
2005-03-18 Zack Weinberg <zack@codesourcery.com> 2005-03-18 Zack Weinberg <zack@codesourcery.com>
* gcc_update: Add --silent option. * gcc_update: Add --silent option.

View File

@ -166,15 +166,15 @@ touch_files_reexec () {
# This functions applies a patch to an existing tree. # This functions applies a patch to an existing tree.
apply_patch () { apply_patch () {
if [ -f $1 ]; then if [ -f "$1" ]; then
echo "Applying patch file $1" echo "Applying patch file $1"
case "$1" in case $1 in
*gz) *gz)
gzip -d -c $1 | patch -p1 ;; gzip -d -c "$1" | patch -p1 ;;
*bz2) *bz2)
bzip2 -d -c $1 | patch -p1 ;; bzip2 -d -c "$1" | patch -p1 ;;
*) *)
cat $1 | patch -p1 ;; patch -p1 < "$1";;
esac esac
fi fi
touch_files_reexec touch_files_reexec