don't use sub-shell, better VERSION

This commit is contained in:
Gwenhael Le Moine 2013-06-22 13:49:09 +02:00
parent 83a284ec24
commit 3c32d308bd

View file

@ -1,9 +1,8 @@
#!/bin/sh -x
# variables
VERSION=master_$(date +"%Y.%m.%d_%H.%M")
BUILD=1
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=2
TAG=cyco
OUTPUT=/tmp
@ -32,14 +31,14 @@ if [ ! -e $REPOSITORY ] ; then
mkdir -p $(dirname $REPOSITORY)
cd $(dirname $REPOSITORY)
git clone "https://github.com/jwiegley/emacs-chess.git" $PRGNAM
fi
else
( cd $REPOSITORY
git pull
)
fi
cp -R $REPOSITORY $TMP
( cd $TMP/$PRGNAM
cd $TMP/$PRGNAM
./autogen.sh
./configure \
--prefix=$PREFIX \
@ -47,12 +46,13 @@ cp -R $REPOSITORY $TMP
make
make install DESTDIR=$PKG
rm $PKG$PREFIX/info/dir
)
find $PKG$PREFIX/info/ -type f -name \*.info -exec gzip -9 {} \;
VERSION=$(grep version $PKG$PREFIX/share/emacs/site-lisp/_pkg.el | grep -o '[0-9.]*')_$VERSION
# correction
( cd $PKG
cd $PKG
chown -R root:root *
)
# embaumement
mkdir -p $PKG/install
@ -88,5 +88,4 @@ $PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz