2013-12-14 08:56:01 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2013-12-15 09:06:41 +00:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
DIR=`pwd`
|
2014-03-24 20:16:34 +00:00
|
|
|
PACKAGETMP=`mktemp -d /tmp/XXXXXXXX`
|
2013-12-15 09:06:41 +00:00
|
|
|
|
|
|
|
REVHASH=`git rev-parse --short HEAD`
|
|
|
|
CCTOOLSVER=`cat README.md | grep "Current Version: " | awk '{print $3}'`
|
|
|
|
LD64VER=`cat README.md | grep "Current Version: " | awk '{print $5}'`
|
|
|
|
|
2014-10-14 21:07:31 +00:00
|
|
|
PACKAGE=cctools-${CCTOOLSVER}-${LD64VER%?}_$REVHASH
|
2013-12-15 09:06:41 +00:00
|
|
|
|
|
|
|
mkdir $PACKAGETMP/$PACKAGE
|
|
|
|
cp -r . $PACKAGETMP/$PACKAGE
|
|
|
|
|
|
|
|
pushd $PACKAGETMP &>/dev/null
|
|
|
|
|
|
|
|
pushd $PACKAGE &>/dev/null
|
2014-10-14 21:07:31 +00:00
|
|
|
git clean -fdx &>/dev/null
|
2013-12-15 09:06:41 +00:00
|
|
|
rm -rf .git
|
|
|
|
rm -f cctools*.tar.*
|
|
|
|
rm -f package.sh
|
2014-02-15 15:35:44 +00:00
|
|
|
rm -f .gitignore
|
2014-10-14 21:07:31 +00:00
|
|
|
pushd cctools &>/dev/null
|
|
|
|
./autogen.sh
|
2015-03-15 21:21:16 +00:00
|
|
|
rm -rf autom4te.cache
|
2014-10-14 21:07:31 +00:00
|
|
|
popd &>/dev/null
|
2013-12-15 09:06:41 +00:00
|
|
|
popd &>/dev/null
|
|
|
|
|
2014-03-24 20:16:34 +00:00
|
|
|
tar -cf - * | xz -9 -c - > $DIR/$PACKAGE.tar.xz
|
2013-12-15 09:06:41 +00:00
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
rm -rf $PACKAGETMP
|