[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint.mk: fix VPATH issues
From: |
Akim Demaille |
Subject: |
Re: [PATCH] maint.mk: fix VPATH issues |
Date: |
Fri, 8 Jun 2012 14:59:53 +0200 |
Hi!
Le 8 juin 2012 à 14:20, Jim Meyering a écrit :
> One question:
>
> ...
>> @@ -89,15 +110,23 @@ trap 'exit $?' 1 2 13 15
>> # We must build using sources for which --version reports the
>> # just-released version number, not some string like 7.6.18-20761.
>> # That version string propagates into all documentation.
>> +set -e
>> git checkout -b $tmp_branch v$version
>> -ok=0
>> -./bootstrap && ./configure && make && make web-manual && ok=1
>> -test $ok = 1 || exit 1
>> -
>> -tmp=$(mktemp -d --tmpdir=. web-doc-update.XXXXXX) || exit 1
>> +git submodule update --recursive
>> +./bootstrap
>
> I like to avoid using pwd, because it can fail (admittedly unlikely, but...).
> Did you consider just doing the "cd" and those four commands in a sub-shell,
> instead?
Actually I lost trust in subshells :( It's too hard to have a
shell script fail from a subshell (calling your "die" does not
suffice).
#! /bin/sh
set -e
(
set -e
exit 42
echo end
)
echo "done ($?)"
$ sh /tmp/subsh.sh
done (42)
I would have expected the outer set -e to be effective. But
I can check $? at the end if you prefer, and go with ().
(Also, in some of my scripts I issue GNU Make-like "entering"
messages for sake of Emacs, so using "cd $cwd" became more
natural to me than relying on subshells)
>> +srcdir=$(pwd)
>> +cd "$builddir"
>> + ./config.status --recheck
>> + ./config.status
>> + make
>> + make web-manual
>> +cd "$srcdir"
>> +set +e
>> +
>> +tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1
>> ( cd $tmp \
>> && cvs -d address@hidden:/webcvs/$pkg co $pkg )
>> -rsync -avP doc/manual/ $tmp/$pkg/manual
>> +rsync -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
- Re: [PATCH] maint.mk: fix VPATH issues, (continued)
- Re: [PATCH] maint.mk: fix VPATH issues, Akim Demaille, 2012/06/07
- Re: [PATCH] maint.mk: fix VPATH issues, Akim Demaille, 2012/06/08
- Re: [PATCH] maint.mk: fix VPATH issues, Jim Meyering, 2012/06/08
- Re: [PATCH] maint.mk: fix VPATH issues, Jim Meyering, 2012/06/08
- Re: [PATCH] maint.mk: fix VPATH issues,
Akim Demaille <=
- Re: [PATCH] maint.mk: fix VPATH issues, Akim Demaille, 2012/06/11
- Re: [PATCH] maint.mk: fix VPATH issues, Jim Meyering, 2012/06/11
- Re: [PATCH] maint.mk: fix VPATH issues, Akim Demaille, 2012/06/12