forked from starlingx-staging/stx-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·63 lines (52 loc) · 1.39 KB
/
setup.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
58
59
60
61
62
63
#!/usr/bin/env bash
if ! type "debmake" > /dev/null; then
sudo apt-get install -y debmake
fi
if ! type "pbuilder" > /dev/null; then
sudo apt-get install -y pbuilder
fi
if ! type "dpkg-scanpackages" > /dev/null; then
sudo apt-get install -y dpkg-dev
fi
if [ ! -f /var/cache/pbuilder/base.tgz ] ; then
sudo pbuilder create
fi
if [ ! -d "/usr/lib/grub/i386-pc" ]; then
sudo apt-get install -y grub-pc
fi
sudo mkdir -p /usr/local/mydebs/
sudo mkdir -p /var/cache/pbuilder/hook.d/
cp configs/pbuilderrc ~/.pbuilderrc
sudo cp configs/D70results /var/cache/pbuilder/hook.d/
if [ ! -d "autodeb" ] ; then
git clone --depth=1 https://github.com/VictorRodriguez/autodeb.git
else
echo "Updating autodeb"
cd autodeb/ && git pull
cd ..
fi
if [ ! -d "linuxbuilder" ] ; then
git clone --depth=1 https://github.com/VictorRodriguez/linuxbuilder.git
else
echo "Updating linuxbuilder"
cd linuxbuilder/ && git pull
cd ..
fi
if [ ! -d "live_img" ]; then
git clone --depth=1 https://github.com/marcelarosalesj/live_img.git
else
echo "Updating live_img"
cd live_img/ && git pull
cd ..
fi
# clone source code repos on specific branches
filename='repos'
while IFS=, read GIT_REPO BRANCH; do
DIR=$(basename $GIT_REPO .git)
if [ ! -z $DIR ];then
if [ ! -d "$DIR" ] ; then
git clone -b $BRANCH --depth=1 $GIT_REPO
fi
fi
done < $filename
echo "Set up complete"