llvm/make-clang-snapshot.sh

19 lines
333 B
Bash
Raw Normal View History

2013-05-08 17:05:11 +00:00
#!/bin/sh
DIRNAME=clang-$( date +%Y%m%d )
URL=http://llvm.org/git/clang.git
rm -rf $DIRNAME
git clone $URL $DIRNAME
cd $DIRNAME
if [ -z "$1" ]; then
git log | head -1
else
git checkout $1
fi
git log | head -1 | awk '{ print $2 }' > ../commitid
rm -rf .git
cd ..
tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz
rm -rf $DIRNAME