-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
57 lines (44 loc) · 1 KB
/
build.sh
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
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# требования: zip, unzip, curl, jq, git, настроенный доступ ssh в гитхабе
rm -rf tmpbuild
mkdir tmpbuild
cd tmpbuild
# запускаем счет файла
while read line;do
IFS=";"
set -- $line
# папка расширения
FOLDER=$1
# название репозитория
REPO=$2
# тип скачивания
TYPE=$3
# тип скачивания через git с указанием ветки
if [[ "${TYPE}" == "git" ]]
then
BRANCH=$4
if [[ "${BRANCH}" == "master" ]]
then
BRANCH=""
fi
if [[ "${BRANCH}" == "main" ]]
then
BRANCH=""
fi
git clone ${BRANCH} [email protected]:"${REPO}".git ${FOLDER}
cd "${FOLDER}"
rm -f README.md
rm -f .gitignore
rm -rf .git
cd ..
fi
done < ../exts.txt
cd pkg_quantummanager
mv * ..
cd ..
rm -rf pkg_quantummanager
zip -r pkg_quantummanager.zip *
mv pkg_quantummanager.zip ..
cd ..
rm -rf tmpbuild
clear