-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate.all.git.repositories.bash
executable file
·57 lines (50 loc) · 1.69 KB
/
update.all.git.repositories.bash
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
#!/usr/bin/env bash
# Copyright 2017-2022 (c) all rights reserved
# by S D Rausty https://sdrausty.github.io
#####################################################################
set -Eeuo pipefail
shopt -s nullglob globstar
unset LD_PRELOAD
VERSIONID="v2.2"
_SUAGRERROR_() { # Run on script error.
local RV="$?"
echo Signal "$RV" received!
printf "\\e[?25h\\e[1;7;38;5;0mbuildAPKs %s ERROR: Signal %s received! See \`stnderr*.log files.\`\\e[0m\\n" "${0##*/}" "$RV"
exit 240
}
_SUAGREXIT_() { # Run on exit.
local RV="$?"
sleep 0.04
if [[ "$RV" = 0 ]]
then
printf "\\a\\e[0;32m%s %s \\a\\e[0m$VERSIONID\\e[1;34m: \\a\\e[1;32m%s\\e[0m\\n\\n\\a\\e[0m" "${0##*/}" "$ARGS" "DONE 🏁 "
printf "\\e]2; %s: %s \\007" "${0##*/} $ARGS" "DONE 🏁 "
else
printf "\\a\\e[0;32m%s %s \\a\\e[0m$VERSIONID\\e[1;34m: \\a\\e[1;32m%s %s\\e[0m\\n\\n\\a\\e[0m" "${0##*/}" "$ARGS" "[Exit Signal $RV]" "DONE 🏁 "
printf "\033]2; %s: %s %s \\007" "${0##*/} $ARGS" "[Exit Signal $RV]" "DONE 🏁 "
fi
printf "\\e[?25h\\e[0m"
set +Eeuo pipefail
exit
}
__SUAGRSIGNAL_() { # Run on signal.
printf "\\e[?25h\\e[1;7;38;5;0mbuildAPKs %s WARNING: Signal %s received!\\e[0m\\n" "${0##*/}" "$?"
exit 241
}
_SUAGRQUIT_() { # Run on quit.
printf "\\e[?25h\\e[1;7;38;5;0mbuildAPKs %s WARNING: Quit signal %s received!\\e[0m\\n" "${0##*/}" "$?"
exit 242
}
if [[ -z "${1:-}" ]]
then
ARGS=""
else
ARGS="$@"
fi
trap '_SUAGRERROR_ $LINENO $BASH_COMMAND $?' ERR
trap _SUAGREXIT_ EXIT
trap _SUAGRSIGNAL_ HUP INT TERM
trap _SUAGRQUIT_ QUIT
find -type d -name .git -execdir /data/data/com.termux/files/home/buildAPKs/scripts/maintenance/update.git.repository.bash {} \;
exit $?
# update.all.git.repositories.bash EOF