forked from SDRausty/buildAPKs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildMyFirstAPKinTermux.sh
executable file
·40 lines (34 loc) · 1.1 KB
/
buildMyFirstAPKinTermux.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
#!/usr/bin/env bash
# Copyright 2017-2020 (c) all rights reserved
# by S D Rausty https://sdrausty.github.io
#####################################################################
set -Eeuo pipefail
shopt -s nullglob globstar
_SETRPERROR_() { # Run on script error.
local RV="$?"
printf "\\e[?25h\\e[1;7;38;5;0mbuildAPKs %s ERROR: Signal %s received!\\e[0m\\n" "${0##*/}" "$RV"
exit 201
}
_SETRPEXIT_() { # Run on exit.
printf "\\e[?25h\\e[0m"
set +Eeuo pipefail
exit
}
_SETRPSIGNAL_() { # Run on signal.
local RV="$?"
printf "\\e[?25h\\e[1;7;38;5;0mbuildAPKs %s WARNING: Signal %s received!\\e[0m\\n" "${0##*/}" "$RV"
exit 211
}
_SETRPQUIT_() { # Run on quit.
local RV="$?"
printf "\\e[?25h\\e[1;7;38;5;0mbuildAPKs %s WARNING: Quit signal %s received!\\e[0m\\n" "${0##*/}" "$RV"
exit 221
}
trap '_SETRPERROR_ $LINENO $BASH_COMMAND $?' ERR
trap _SETRPEXIT_ EXIT
trap _SETRPSIGNAL_ HUP INT TERM
trap _SETRPQUIT_ QUIT
export JAD=github.com/BuildAPKs/buildAPKs.entertainment
export JID=entertainment # job id/name
. "$HOME/buildAPKs/scripts/bash/init/init.bash" "$@"
# build.entertainment.bash EOF