Commit eed1a4d6 authored by Richard Mortier's avatar Richard Mortier
Browse files

entrypoint: test if `~/.abuild` writable, fail if not


Signed-off-by: Richard Mortier's avatarRichard Mortier <mort@cantab.net>
parent 55dbf2a7
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment