Allow multi-word "install" command.
Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:
# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"
# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory
# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.
Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
5 if [ -z "${repos}" -o ! -d "${repos}" -o -z "${pdir}" -o ! -d "${pdir}" ];then
6 printf "Usage: ${0##*/} <repos_dir> <patch_dir>\n"
10 pdir="$( cd "${pdir}"; pwd)"
11 version="$( echo "${pdir}" |sed -r -e 's,.*/([^/]+)/*$,\1,' )"
12 branch="${version%.*}"
13 n=$( ls -1 "${pdir}" 2>/dev/null |wc -l )
15 r1="$( hg -R "${repos}" log -b "${branch}" \
22 $0~/^summary:[[:space:]]+'"${branch}: (bump|update) version to ${version}\+hg"'$/ {
23 printf( "%d\n", prev );
29 hg -R "${repos}" log -b "${branch}" -r "${r1}:tip" --template '{rev}\n' \
31 p="$( printf "%03d" ${i} )"
33 if [ $( ls -1 "${pdir}/${p}-"*.patch 2>/dev/null |wc -l ) -ne 0 ]; then
36 plog=$( hg -R "${repos}" log -r ${rev} --template '{desc|firstline}\n' \
37 |sed -r -e 's,[^[:alnum:]],_,g; s/_+/_/g;' \
39 pname="${p}-${plog}.patch"
40 printf "Revision '%d' --> '%s'\n" ${rev} "${pname}"
41 hg -R "${repos}" diff -c ${rev} --color=never >"${pdir}/${pname}"
42 pdate="$( hg -R "${repos}" log -r ${rev} --template '{date|isodate}\n' )"
43 touch -d "${pdate}" "${pdir}/${pname}"