-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·57 lines (47 loc) · 1.52 KB
/
bootstrap
File metadata and controls
executable file
·57 lines (47 loc) · 1.52 KB
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
#!/bin/bash -e
export PATH="$HOME/.local/bin:$PATH"
python3 --version
echo '[-] Installing required dependencies to local user folder...'
rm -f get-pip.py
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
pip3 install --user pyparsing setuptools
echo '[-] Installing acbs (stage 0)...'
python3 setup.py install --user
rm -f get-pip.py
echo '[-] Testing acbs...'
"$HOME/.local/bin/acbs-build" --version
if ! command -v autobuild > /dev/null 2>&1; then
echo '[!] Autobuild3 not detected on your system.'
echo '[!] Please manually run the following command:'
# shellcheck disable=SC2016
echo 'export PATH="$HOME:/.local/bin/":$PATH'
exit 0
fi
if ! command -v git > /dev/null 2>&1; then
echo '[!] GIT not detected on your system.'
exit 1
fi
echo '[-] Installing acbs (stage 1)...'
TMPDIR="$(mktemp -d)"
cd "$TMPDIR"
git clone --filter=blob:none -b stable https://github.com/AOSC-Dev/aosc-os-abbs
ABBSDIR="$(readlink -f aosc-os-abbs)"
mkdir -p '/etc/acbs/'
mkdir -p '/var/cache/acbs/'{build,tarballs}
mkdir -p '/var/log/acbs/'
[ -f /etc/acbs/forest.conf ] && echo '[-] Backing up forest.conf...' && cp -v /etc/acbs/forest.conf /etc/acbs/forest.conf.bak
cat << EOF > /etc/acbs/forest.conf
[default]
location = ${ABBSDIR}
EOF
echo ABSPLITDBG=0 \
>> "${ABBSDIR}"/app-devel/acbs/autobuild/defines
"$HOME/.local/bin/acbs-build" acbs
cd ..
echo '[-] Installing acbs (final)...'
acbs-build acbs
echo '[-] Cleaning up...'
rm -rf "$TMPDIR"
acbs-build -c
cp -v /etc/acbs/forest.conf.bak /etc/acbs/forest.conf