diff options
Diffstat (limited to 'makesrc.sh')
| -rwxr-xr-x | makesrc.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..8111001 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,19 @@ +#!/bin/sh +NAME=$(basename $PWD) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) + +if [ -f $NAME-$VERSION.tar.xz ]; then + echo Already done +else + echo "Cloning..." + rm -rf $NAME-$VERSION + git clone --recursive --depth 1 --shallow-submodules https://github.com/qelectrotech/qelectrotech-source-mirror.git --branch $VERSION $NAME-$VERSION + + echo "Archiving..." + tar czf $NAME-$VERSION.tar.xz --exclude-vcs $NAME-$VERSION + + echo "Cleaning..." + rm -rf $NAME-$VERSION +fi + + |
