-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
34 lines (28 loc) · 733 Bytes
/
setup.sh
File metadata and controls
34 lines (28 loc) · 733 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
#!/bin/bash
die() { echo -e "[E] ${*}";exit 1;:;}
warn() { echo -e "[W] ${*}";:;}
shout() { echo -e "[-] ${*}";:;}
lshout() { echo -e "-> ${*}";:;}
msg() { echo -e "${*} \e[0m" >&2;:;}
DEPS="git build-essential binfmt-support qemu-user-static debootstrap"
# ROOT user check
if ((UID != 0 )); then
die "please run this script as root"
else
SUDO=$(which sudo)
fi
# Force install dependencies
shout "Resolving Dependencies"
$SUDO apt update || {
die "Failed to update indexes"
}
$SUDO apt install -y "$DEPS" || {
die "Failed to install packages.."
}
# pull submodules
shout "Trying to update submodules.."
git submodule init
git submoudule update || {
die "Failed to pull submodules."
}
shout "DONE."