git2targz.sh 321 B

123456789101112131415161718
  1. #!/bin/sh
  2. PRGNAM=calf
  3. URL=https://github.com/calf-studio-gear/$PRGNAM.git
  4. DATE=$( date +%Y%m%d )
  5. rm -rf $PRGNAM
  6. git clone $URL $PRGNAM
  7. cd $PRGNAM
  8. REV=$( git rev-parse --short @ )
  9. rm -rf .git*
  10. cd -
  11. VERSION=$DATE.$REV
  12. rm -rf $PRGNAM-$VERSION
  13. mv $PRGNAM $PRGNAM-$VERSION
  14. tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION