Kaydet (Commit) 5da12b11 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

autogen.sh: Remove bashism / non-portable stuff.

üst 6637546a
......@@ -15,7 +15,19 @@ requote()
set -- "${@//\'/$q\'$q}" # quote inner instances of '
set -- "${@/#/$q}" # add ' to start of each param
set -- "${@/%/$q}" # add ' to end of each param
echo "$*"
echo "$*" # ' in a comment to stop confusing vim
}
distro()
{
name=''
while test "$#" -gt 0 ; do
case "$1" in
--with-distro=*) name=${1#--with-distro=} ;;
esac
shift
done
echo $name
}
old_args=""
......@@ -34,16 +46,16 @@ if test "z`uname -s`" != "zDarwin" ; then
fi
conf_args=$(requote "$@")
distro_name=$(requote "$@" | sed -n -e "s/.*'--with-distro=\([^']*\)'.*/\1/p")
distro_name=$(distro "$@")
if test "z${distro_name}" != "z" ; then
cumul=""
if test -f "./distro-configs/${distro_name}.conf" ; then
IFS=$'\n'
IFS="$(printf '\n')"
for opt in $(cat distro-configs/${distro_name}.conf) ; do cumul="$cumul $opt" ; done ;
unset IFS
conf_args=$(requote "$@" | sed -e "s/'--with-distro=[^']*'/$cumul/")
else
echo "Warning: there is no pre-set configuration for ${distro_config}, ignoring --with-distro=${distro_config}"
echo "Warning: there is no pre-set configuration for ${distro_name}, ignoring --with-distro=${distro_name}"
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment