-
Notifications
You must be signed in to change notification settings - Fork 0
/
islandora-git-clone
executable file
·44 lines (38 loc) · 948 Bytes
/
islandora-git-clone
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Bash script to quickly clone all Islandora Foundation modules
# Usage info
show_help() {
cat << EOF
Usage: ${0##*/} [-h] [-m MODULE LIST] [-p PATH] ...
Clone all Islandora Foundation modules to a given path.
-h display this help and exit
-m MODULE LIST path to line delimited list of modules.
-p PATH path to which the Islandora Foundation modules should be clone.
EOF
}
ISLANDORA_CLONE_PATH=""
ISLANDORA_MODULES_LIST=""
OPTIND=1
while getopts "h:p:m:" opt; do
case "$opt" in
h)
show_help
exit 0
;;
m) ISLANDORA_MODULES_LIST=$OPTARG
;;
p) ISLANDORA_CLONE_PATH=$OPTARG
;;
'?')
show_help >&2
exit 1
;;
esac
done
if [[ -n $opt ]]; then
# get modules
cd $ISLANDORA_CLONE_PATH
cat $ISLANDORA_MODULES_LIST | while read line; do
git clone -b 7.x-1.6 [email protected]:islandora/$line
done
fi