aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xentrypoint.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/entrypoint.sh b/entrypoint.sh
index 9aa1adb..c9dfc55 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -2,12 +2,22 @@
set -e
+die () {
+ printf >&2 "%s\n" "$@"
+ exit 1
+}
+
## debug
if [ "$DABUILD_DEBUG" = "true" ]; then
set -x
PS4='$LINENO: '
fi
+## check can write to ~/.abuild
+if [ ! -w "$HOME/.abuild/" ]; then
+ die "Error: unwritable ~/.abuild [$(ls -lad ~/.abuild | cut -d " " -f 1)]"
+fi
+
## generate signing keys on first run
if [ ! -r "$HOME/.abuild/abuild.conf" ]; then
abuild-keygen -n -a