pkg.sh 392 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # A little script to create tarball, especially for Oasis2Opam
  3. echo "Start"
  4. # If directory doesn't exist, create it
  5. if ! [[ -e dist ]]; then
  6. mkdir dist
  7. fi
  8. # If no tag, use commit SHA1
  9. tag=`git tag --points-at HEAD`
  10. id=`git rev-parse --short --verify HEAD`
  11. name=OcLaunch_${tag}-${id}.tgz
  12. echo "Write in" $name
  13. git archive master --prefix=${name}/ --format=tgz -o dist/$name