[Libreoffice-commits] .: autogen.sh
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Dec 1 15:16:44 PST 2010
autogen.sh | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 4d4a49043e942d1a2abbfd938576065f1537963b
Author: Jan Holesovsky <kendy at suse.cz>
Date: Thu Dec 2 00:13:47 2010 +0100
autogen.sh: Even more portable.
diff --git a/autogen.sh b/autogen.sh
index 1ce957a..c7a1136 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -11,23 +11,27 @@ fi
requote()
{
- local q=\'
- set -- "${@//\'/$q\'$q}" # quote inner instances of '
- set -- "${@/#/$q}" # add ' to start of each param
- set -- "${@/%/$q}" # add ' to end of each param
- echo "$*" # ' in a comment to stop confusing vim
+ out=""
+ for param in "$@" ; do
+ p=`echo "$param" | sed "s/'/'\\\\\\''/g"`
+ if test -z "$out" ; then
+ out="'$p'"
+ else
+ out="$out '$p'"
+ fi
+ done
+ echo "$out"
}
distro()
{
name=''
- while test "$#" -gt 0 ; do
- case "$1" in
- --with-distro=*) name=${1#--with-distro=} ;;
+ for param in "$@" ; do
+ case "$param" in
+ --with-distro=*) name=${param#--with-distro=} ;;
esac
- shift
done
- echo $name
+ echo "$name"
}
old_args=""
More information about the Libreoffice-commits
mailing list