clone.sh 516 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. ARG_DEFS=(
  3. "--repository=(.*)"
  4. "--directory=(.*)"
  5. "[--branch=(.*)]"
  6. )
  7. function run {
  8. rm -rf $DIRECTORY
  9. mkdir -p $DIRECTORY
  10. echo "-- Cloning $REPOSITORY#$BRANCH to $DIRECTORY..."
  11. ARGS="--branch=${BRANCH:-master} --depth=2"
  12. git config --global user.email "hi@ionicframework.com"
  13. git config --global user.name "Ionitron"
  14. git clone git@github.com:ionic-team/$REPOSITORY.git $DIRECTORY $ARGS
  15. cd $DIRECTORY
  16. git fetch origin --tags
  17. cd ../
  18. }
  19. source $(dirname $0)/../utils.sh.inc