2
2
# clone vendors repositories to ./core/vendors
3
3
REPO_NAME=" terminalForCoder__WSD"
4
4
PATH_TO_CORE=" ${HOME} /${REPO_NAME} /bash/core"
5
- PATH_TO_VENDOR_REPO =" ${HOME} /${REPO_NAME} /vendors"
5
+ PATH_TO_VENDORS_REPO =" ${HOME} /${REPO_NAME} /vendors"
6
6
7
7
# array with repositories
8
8
repositories=( " https://github.com/larscmagnusson/CSS3MultiColumn.git" " https://github.com/tc39/test262.git" " https://github.com/postcss/postcss" " https://github.com/webpack/webpack" " https://github.com/var-bin/spriteFactory.git" " https://github.com/var-bin/backbone-training.git" " https://github.com/var-bin/flex-grid-framework.git" " https://github.com/var-bin/BrandButtons.git" " https://github.com/var-bin/less-easings.git" )
@@ -20,11 +20,11 @@ cloneVendors() {
20
20
exit 0
21
21
fi
22
22
23
- # if "${PATH_TO_VENDOR_REPO }" is not exist
24
- # create "${PATH_TO_VENDOR_REPO }" directory
25
- if [[ ! -e " ${PATH_TO_VENDOR_REPO } " ]]
23
+ # if "${PATH_TO_VENDORS_REPO }" is not exist
24
+ # create "${PATH_TO_VENDORS_REPO }" directory
25
+ if [[ ! -e " ${PATH_TO_VENDORS_REPO } " ]]
26
26
then
27
- mkdir " ${PATH_TO_VENDOR_REPO } "
27
+ mkdir " ${PATH_TO_VENDORS_REPO } "
28
28
fi
29
29
30
30
while [ " $i " -lt " $repositories_count " ]
@@ -33,28 +33,28 @@ cloneVendors() {
33
33
vendor=$( echo ${repositories[$i]} | sed " s/https\:\/\/github\.com\/*//g" | sed " s/\/.*//g" )
34
34
vendor_repo_name=$( echo ${repositories[$i]} | sed " s/https\:\/\/github\.com\/.*\///g" | sed " s/\.git//g" )
35
35
36
- # if "${PATH_TO_VENDOR_REPO }/${vendor}" is directory
36
+ # if "${PATH_TO_VENDORS_REPO }/${vendor}" is directory
37
37
# go to directory and do git clone stuff
38
- if [[ -d " ${PATH_TO_VENDOR_REPO } /${vendor} " ]]
38
+ if [[ -d " ${PATH_TO_VENDORS_REPO } /${vendor} " ]]
39
39
then
40
- echo " Directory ${PATH_TO_VENDOR_REPO } /${vendor} is exist"
40
+ echo " Directory ${PATH_TO_VENDORS_REPO } /${vendor} is exist"
41
41
42
- if [[ ! -e " ${PATH_TO_VENDOR_REPO } /${vendor} /${vendor_repo_name} " ]]
42
+ if [[ ! -e " ${PATH_TO_VENDORS_REPO } /${vendor} /${vendor_repo_name} " ]]
43
43
then
44
44
echo " Repository: ${repositories[$i]} is clonning"
45
- cd " ${PATH_TO_VENDOR_REPO } /${vendor} " && git clone ${repositories[$i]}
45
+ cd " ${PATH_TO_VENDORS_REPO } /${vendor} " && git clone ${repositories[$i]}
46
46
else
47
- echo " Repository ${PATH_TO_VENDOR_REPO } /${vendor} /${vendor_repo_name} is exist"
47
+ echo " Repository ${PATH_TO_VENDORS_REPO } /${vendor} /${vendor_repo_name} is exist"
48
48
echo " "
49
49
fi
50
50
else
51
- # create directory "${PATH_TO_VENDOR_REPO }/${vendor}"
51
+ # create directory "${PATH_TO_VENDORS_REPO }/${vendor}"
52
52
# go to directory and do git clone stuff
53
- echo " Create directory: ${PATH_TO_VENDOR_REPO } /${vendor} "
54
- mkdir " ${PATH_TO_VENDOR_REPO } /${vendor} "
53
+ echo " Create directory: ${PATH_TO_VENDORS_REPO } /${vendor} "
54
+ mkdir " ${PATH_TO_VENDORS_REPO } /${vendor} "
55
55
56
56
echo " Repository: ${repositories[$i]} is clonning"
57
- cd " ${PATH_TO_VENDOR_REPO } /${vendor} " && git clone ${repositories[$i]}
57
+ cd " ${PATH_TO_VENDORS_REPO } /${vendor} " && git clone ${repositories[$i]}
58
58
fi
59
59
i=$(( i + 1 )) # i++
60
60
done
0 commit comments