FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ionic/scripts/git/clone.sh at angular-rc1 · Java1024/ionic · GitHub
Java1024
ionic
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ionic
/
scripts
/
git
/
clone.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
28 lines (23 loc) · 534 Bytes
Breadcrumbs
ionic
/
scripts
/
git
/
clone.sh
Copy path
File metadata and controls
executable file
·
28 lines (23 loc) · 534 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
27
28
#!
/bin/bash
ARG_DEFS=(
"
--repository=(.*)
"
"
--directory=(.*)
"
"
[--depth=(.*)]
"
"
[--branch=(.*)]
"
)
function
run
{
rm -rf
$DIRECTORY
mkdir -p
$DIRECTORY
echo
"
-- Cloning
$REPOSITORY
#
$BRANCH
to
$DIRECTORY
...
"
ARGS=
"
--branch=
${BRANCH
:-
master}
"
if
[[
"
$DEPTH
"
!=
"
"
]]
;
then
ARGS=
"
$ARGS
--depth=
$DEPTH
"
else
ARGS=
"
$ARGS
--depth=2
"
fi
git clone https://driftyco:
$GH_TOKEN
@github.com/
$REPOSITORY
$DIRECTORY
$ARGS
cd
$DIRECTORY
git fetch origin --tags
cd
../
}
source
$(
dirname
$0
)
/../utils.sh.inc
Back
|
FazBrowse Home
|
New Git URL