Make: Move .tarball-version generation out of src/scripts/tarball
Commit 1ec9b94
made src/scripts/tarball generate .tarball-version and
.dirty-stamp. Hardcoding it like that there is a bit ugly.
Move it into a separate tweak script that is run right before tar.
We'll tweak some more in the next commits.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
240474195d
commit
63c6dd6896
3 changed files with 24 additions and 5 deletions
11
src/scripts/gen-tarball-version
Executable file
11
src/scripts/gen-tarball-version
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "Usage: $0 NAME VERSION (FILE | -C DIR)..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nv=$1-$2
|
||||
|
||||
printf "%s" "$2" >$nv/.tarball-version
|
||||
>$nv/.dirty-stamp
|
|
@ -1,18 +1,23 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "Usage: $0 NAME (FILE | -C DIR)..."
|
||||
echo "Usage: $0 [-x TWEAK-SCRIPT ] NAME VERSION (FILE | -C DIR)..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
script=:
|
||||
if [ "$1" == -x ]
|
||||
then
|
||||
script=$2
|
||||
shift; shift
|
||||
fi
|
||||
|
||||
name="$1"
|
||||
version="$2"
|
||||
shift; shift
|
||||
|
||||
nv=$name-$version
|
||||
mkdir $nv
|
||||
printf "%s" $version >$nv/.tarball-version
|
||||
>$nv/.dirty-stamp
|
||||
|
||||
# arrange cleanup
|
||||
trap 'rm -rf "$nv"' 0
|
||||
|
@ -30,4 +35,6 @@ until [ $# = 0 ]; do
|
|||
shift
|
||||
done
|
||||
|
||||
$script $name $version
|
||||
|
||||
tar -czf $nv.tar.gz --owner=0 --group=0 --mode=ug+w,a+rX $nv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue