diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-02-25 16:57:18 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-02-25 16:57:18 +0100 |
commit | 6732e8a96c7712b78fffd34d3d999a123afccf18 (patch) | |
tree | 162466f88120558464f4a9e9badd80a51cff5aa3 /makesrc.sh | |
parent | f829906a971a1a2800f1d4a1449a002985af8815 (diff) |
php-PHPParser: make getting sources easier
Diffstat (limited to 'makesrc.sh')
-rwxr-xr-x | makesrc.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..d78aad2 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +NAME=php-PHPParser +OWNER=nikic +PROJECT=PHP-Parser +VERSION=$(sed -n '/^%global github_version/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global github_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo "Cloning..." +git clone https://github.com/nikic/PHP-Parser.git $PROJECT-$SHORT + +echo "Gettin commit..." +pushd $PROJECT-$SHORT +git checkout $COMMIT +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$SHORT + +echo "Cleaning..." +rm -rf $PROJECT-$SHORT + +echo "Done." |