cctools-port/package.sh
Thomas Pöchtrager f5d5816851 support NetBSD
Conflicts:
	cctools/configure.ac
2014-03-30 15:51:58 +02:00

31 lines
596 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
DIR=`pwd`
PACKAGETMP=`mktemp -d /tmp/XXXXXXXX`
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}'`
PACKAGE=cctools-${CCTOOLSVER}-${LD64VER}_$REVHASH
mkdir $PACKAGETMP/$PACKAGE
cp -r . $PACKAGETMP/$PACKAGE
pushd $PACKAGETMP &>/dev/null
pushd $PACKAGE &>/dev/null
rm -rf .git
rm -f cctools*.tar.*
rm -f package.sh
rm -f .gitignore
popd &>/dev/null
tar -cf - * | xz -9 -c - > $DIR/$PACKAGE.tar.xz
popd &>/dev/null
rm -rf $PACKAGETMP