Commit 754270e4 authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild-keygen: abort on error

run under `set -e` to we abort on first error

fixes #10028
parent 9c3427d1
......@@ -16,6 +16,7 @@ if ! [ -f "$sharedir/functions.sh" ]; then
fi
. "$sharedir/functions.sh"
set -e
# ask for privkey unless non-interactive mode
# returns value in global $privkey
......@@ -32,7 +33,9 @@ get_privkey_file() {
default_name="${emailaddr:-$USER}-$(printf "%x" $(date +%s))"
privkey="$ABUILD_USERDIR/$default_name.rsa"
[ -n "$non_interactive" ] && return 0
if [ -n "$non_interactive" ]; then
return 0
fi
msg "Generating public/private rsa key pair for abuild"
echo -n "Enter file in which to save the key [$privkey]: "
......
Markdown is supported
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