forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclone.sh
More file actions
executable file
·26 lines (19 loc) · 516 Bytes
/
clone.sh
File metadata and controls
executable file
·26 lines (19 loc) · 516 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
ARG_DEFS=(
"--repository=(.*)"
"--directory=(.*)"
"[--branch=(.*)]"
)
function run {
rm -rf $DIRECTORY
mkdir -p $DIRECTORY
echo "-- Cloning $REPOSITORY#$BRANCH to $DIRECTORY..."
ARGS="--branch=${BRANCH:-master} --depth=2"
git config --global user.email "hi@ionicframework.com"
git config --global user.name "Ionitron"
git clone git@github.com:ionic-team/$REPOSITORY.git $DIRECTORY $ARGS
cd $DIRECTORY
git fetch origin --tags
cd ../
}
source $(dirname $0)/../utils.sh.inc