forked from nakamochi/sysupdates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapply.sh
executable file
·48 lines (39 loc) · 979 Bytes
/
apply.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
#!/bin/sh
# the script executes updates to a nakamochi system.
# it must be run as root or a user with equivalent privileges.
# at script exit, report system/user CPU times it took to run
# the whole update while preserving exit code.
trap times EXIT
# abort if an expansion encounteres an unset variable.
set -u
exit_code=0
# defined in the caller script
rootdir="$SYSUPDATES_ROOTDIR"
# keys
printf "######## keys\n" 1>&2
cd "$rootdir"
./keys/keys.sh || exit 1
# base os
printf "######## base os\n" 1>&2
cd "$rootdir"
./base/voidlinux.sh || exit 1
printf "######## tor\n" 1>&2
cd "$rootdir"
./base/tor.sh || exit_code=$?
# nakamochi daemon and gui (ndg)
printf "######## ndg\n" 1>&2
cd "$rootdir"
. ./ndg/env
ndg_apply || exit_code=$?
# bitcoin core
printf "######## bitcoind\n" 1>&2
cd "$rootdir"
. ./btc/env
bitcoin_apply || exit_code=$?
# lnd lightning
printf "######## lnd\n" 1>&2
cd "$rootdir"
. ./lnd/env
lnd_apply || exit_code=$?
# TODO: electrs
exit $exit_code