chore(termux): update readme for termux setup and then some

Also adding some debugging-related chores btw.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
This commit is contained in:
Andrei Jiroh Halili 2024-08-13 23:42:20 +08:00
parent 271e12477c
commit cbeb6b6b85
No known key found for this signature in database
GPG key ID: 67BFC91B3DA12BE8
4 changed files with 47 additions and 93 deletions

View file

@ -8,18 +8,23 @@
set -eu
if [[ $DEBUG != "" ]]; then
set -x
fi
# Directory to look for bootstrap executables in
BOOTSTRAP_D="${BASH_SOURCE[0]}.d"
if [[ ! -d "$BOOTSTRAP_D" ]]; then
echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2
echo "[bootstrap] Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2
exit 1
fi
find -L "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
echo "[bootstrap] running $bootstrap"
if ! "$bootstrap"; then
echo "Error: bootstrap '$bootstrap' failed" >&2
echo "[bootstrap] Error: bootstrap '$bootstrap' failed" >&2
exit 1
fi
fi