Skip to content

Commit 70648ef

Browse files
1 parent ae657ef commit 70648ef

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

suites/oracular/raw/raw.sh

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#!/usr/bin/env bash
2+
#shellcheck disable=SC1091
3+
4+
# this is an example file to BUILD raw file system
5+
# export variable SUITE to set debootstrap suite name (default: hirsute)
6+
7+
source plugins/envsetup
8+
9+
export OVERRIDER_COMPRESSION_TYPE
10+
export SUITE
11+
export ENABLE_EXIT
12+
export ENABLE_USER_SETUP
13+
14+
SUITE="oracular"
15+
frn="out/$SUITE-raw"
16+
OVERRIDER_COMPRESSION_TYPE="gzip"
17+
ENABLE_EXIT=true
18+
ENABLE_USER_SETUP=false
19+
20+
21+
additional_setup() {
22+
23+
# update sources.list [Only for ubuntu suites]
24+
cat <<-EOF >$chroot_dir/etc/apt/sources.list
25+
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
26+
# newer versions of the distribution.
27+
deb $MIRROR $SUITE main restricted
28+
# deb-src $MIRROR $SUITE main restricted
29+
## Major bug fix updates produced after the final release of the
30+
## distribution.
31+
deb $MIRROR $SUITE-updates main restricted
32+
# deb-src $MIRROR $SUITE-updates main restricted
33+
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
34+
## team. Also, please note that software in universe WILL NOT receive any
35+
## review or updates from the Ubuntu security team.
36+
deb $MIRROR $SUITE universe
37+
# deb-src $MIRROR $SUITE universe
38+
deb $MIRROR $SUITE-updates universe
39+
# deb-src $MIRROR $SUITE-updates universe
40+
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
41+
## team, and may not be under a free licence. Please satisfy yourself as to
42+
## your rights to use the software. Also, please note that software in
43+
## multiverse WILL NOT receive any review or updates from the Ubuntu
44+
## security team.
45+
deb $MIRROR $SUITE multiverse
46+
# deb-src $MIRROR $SUITE multiverse
47+
deb $MIRROR $SUITE-updates multiverse
48+
# deb-src $MIRROR $SUITE-updates multiverse
49+
## N.B. software from this repository may not have been tested as
50+
## extensively as that contained in the main release, although it includes
51+
## newer versions of some applications which may provide useful features.
52+
## Also, please note that software in backports WILL NOT receive any review
53+
## or updates from the Ubuntu security team.
54+
deb $MIRROR $SUITE-backports main restricted universe multiverse
55+
# deb-src $MIRROR $SUITE-backports main restricted universe multiverse
56+
EOF
57+
58+
# set up pv
59+
lshout "Setting up pv..."
60+
cp $ROOT_DIR/core/pv/pv-${t_arch}.deb $chroot_dir
61+
run_cmd "dpkg -i /pv-${t_arch}.deb"
62+
run_cmd "rm /pv-${t_arch}.deb"
63+
64+
# clean any archive if exits
65+
apt-get clean
66+
67+
}
68+
69+
# Option to build specific arch
70+
# arch name as $1
71+
72+
case $1 in
73+
arm64 | armhf | amd64) _arch="$1" ;;
74+
all | -a) _arch="armhf arm64 amd64" ;;
75+
*) die "Unknown arch option [ Allowed: arm64, armhf, amd64, all(for all 3) ]" ;;
76+
esac
77+
78+
for arch in ${_arch}; do
79+
shout "Bootstrapping $SUITE [${arch}] ...."
80+
do_build "${frn}-${arch}" "${arch}"
81+
shout "packing up the raw file systems..."
82+
do_compress "${frn}-${arch}"
83+
shout "unmounting the raw file systems from host..."
84+
do_unmount "${frn}-${arch}"
85+
done
86+
87+
shout "Build Complete.."
88+
ls ${frn}*tar*

0 commit comments

Comments
 (0)