-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.sh
executable file
·130 lines (111 loc) · 4 KB
/
test.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/sh
case "$1" in
amd64)
echo "Building for amd64"
BITS=64
SUBFOLDER="x86_64-linux-gnu"
;;
i386)
echo "Building for i386"
BITS=32
SUBFOLDER="i386-linux-gnu"
;;
armhf)
echo "Building for armhf"
BITS=32
SUBFOLDER="arm-linux-gnueabihf"
;;
*
echo "Building with discovery for installed system"
;;
esac
case "$2" in
"")
echo "Using discovered COMPAT"
;;
*)
echo "Setting COMPAT = $2"
COMPAT="$2"
;;
esac
if [ "amd64" = "$1" ]; then
echo "build amd64 things"
if [ ! -d "/var/cache/pbuilder/debian-stretch-amd64/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/debian-stretch-amd64/aptcache/
sudo OS=debian DIST=stretch ARCH=amd64 pbuilder --create
fi
sudo OS=debian DIST=stretch ARCH=amd64 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/debian-buster-amd64/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/debian-buster-amd64/aptcache/
sudo OS=debian DIST=buster ARCH=amd64 pbuilder --create
fi
sudo OS=debian DIST=buster ARCH=amd64 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/ubuntu-bionic-amd64/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/ubuntu-bionic-amd64/aptcache/
sudo OS=ubuntu DIST=bionic ARCH=amd64 pbuilder --create
fi
sudo OS=ubuntu DIST=bionic ARCH=amd64 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/ubuntu-disco-amd64/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/ubuntu-disco-amd64/aptcache/
sudo OS=ubuntu DIST=disco ARCH=amd64 pbuilder --create
fi
sudo OS=ubuntu DIST=disco ARCH=amd64 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/ubuntu-disco-amd64/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/ubuntu-eoan-amd64/aptcache/
sudo OS=ubuntu DIST=eoan ARCH=amd64 pbuilder --create
fi
sudo OS=ubuntu DIST=eoan ARCH=amd64 pbuilder build *.dsc
fi
if [ "i386" = "$1" ]; then
echo "build i386 things"
if [ ! -d "/var/cache/pbuilder/debian-stretch-i386/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/debian-stretch-i386/aptcache/
sudo OS=debian DIST=stretch ARCH=i386 pbuilder --create
fi
sudo OS=debian DIST=stretch ARCH=i386 pbuilder --create
if [ ! -d "/var/cache/pbuilder/debian-buster-i386/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/debian-buster-i386/aptcache/
sudo OS=debian DIST=buster ARCH=i386 pbuilder --create
fi
sudo OS=debian DIST=buster ARCH=i386 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/ubuntu-bionic-i386/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/ubuntu-bionic-i386/aptcache/
sudo OS=ubuntu DIST=bionic ARCH=i386 pbuilder --create
fi
sudo OS=ubuntu DIST=bionic ARCH=i386 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/ubuntu-disco-i386/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/ubuntu-disco-i386/aptcache/
sudo OS=ubuntu DIST=disco ARCH=i386 pbuilder --create
fi
sudo OS=ubuntu DIST=disco ARCH=i386 pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/ubuntu-eoan-i386/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/ubuntu-eoan-i386/aptcache/
sudo OS=ubuntu DIST=eoan ARCH=i386 pbuilder --create
fi
sudo OS=ubuntu DIST=eoan ARCH=i386 pbuilder build *.dsc
fi
if [ "armhf" = "$1" ]; then
echo "build amd64 things"
if [ ! -d "/var/cache/pbuilder/raspbian-stretch-armhf/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/raspbian-stretch-armhf/aptcache/
sudo OS=raspbian DIST=stretch ARCH=armhf pbuilder --create
fi
sudo OS=raspbian DIST=stretch ARCH=armhf pbuilder build *.dsc
if [ ! -d "/var/cache/pbuilder/raspbian-buster-armhf/aptcache" ]
then
sudo mkdir -p /var/cache/pbuilder/raspbian-buster-armhf/aptcache/
sudo OS=raspbian DIST=buster ARCH=armhf pbuilder --create
fi
sudo OS=raspbian DIST=buster ARCH=armhf pbuilder build *.dsc
fi