mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 23:12:45 +00:00
abuild-keygen: abort on error
run under `set -e` to we abort on first error fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10028
This commit is contained in:
parent
9c3427d16f
commit
754270e460
@ -16,6 +16,7 @@ if ! [ -f "$sharedir/functions.sh" ]; then
|
|||||||
fi
|
fi
|
||||||
. "$sharedir/functions.sh"
|
. "$sharedir/functions.sh"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# ask for privkey unless non-interactive mode
|
# ask for privkey unless non-interactive mode
|
||||||
# returns value in global $privkey
|
# returns value in global $privkey
|
||||||
@ -32,7 +33,9 @@ get_privkey_file() {
|
|||||||
default_name="${emailaddr:-$USER}-$(printf "%x" $(date +%s))"
|
default_name="${emailaddr:-$USER}-$(printf "%x" $(date +%s))"
|
||||||
|
|
||||||
privkey="$ABUILD_USERDIR/$default_name.rsa"
|
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"
|
msg "Generating public/private rsa key pair for abuild"
|
||||||
echo -n "Enter file in which to save the key [$privkey]: "
|
echo -n "Enter file in which to save the key [$privkey]: "
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user