forked from Shells-com/linux-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_image.sh
More file actions
executable file
·53 lines (48 loc) · 768 Bytes
/
build_image.sh
File metadata and controls
executable file
·53 lines (48 loc) · 768 Bytes
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
#!/bin/bash
set -e
. scripts/base.sh
. scripts/getfile.sh
. scripts/docker.sh
. scripts/linux.sh
. oscfg/debian.sh
. oscfg/ubuntu.sh
. oscfg/manjaro.sh
. oscfg/gentoo.sh
. oscfg/fedora.sh
. oscfg/opensuse.sh
dodistro() {
if [ -f "$1-$DATE.qcow2" ]; then
return
fi
case $1 in
manjaro-*)
manjaro_distro "$1"
;;
gentoo-*)
gentoo_distro "$1"
;;
debian-*)
debian_distro "$1"
;;
ubuntu-*)
ubuntu_distro "$1"
;;
fedora-*)
fedora_distro "$1"
;;
opensuse-*)
opensuse_distro "$1"
;;
*)
echo "unsupported distro $1"
;;
esac
finalize "$1"
}
if [ "$1" != x ]; then
dodistro "$1"
else
for foo in manjaro-base manjaro-desktop; do
dodistro "$foo"
done
fi