fix gpg path
All checks were successful
the build was successful

This commit is contained in:
Paolo Asperti 2018-09-28 14:52:24 +02:00
parent ace3997da2
commit cb0f60b289

6
run.sh
View File

@ -22,8 +22,8 @@ echo "${PLUGIN_GPG_KEY}" > /key.asc
eval $(gpg-agent --daemon --allow-preset-passphrase)
# retrieving key ID and GRIP
ID=$(gpg --with-colons /key.asc 2>/dev/null | grep "^sec" | head -n 1 | cut -d\: -f 5 )
GRIP=$(gpg --with-colons --import-options show-only --import /key.asc 2>/dev/null | grep '^grp' | head -n 1 | cut -d\: -f 10 )
ID=$(gpg2 --with-colons /key.asc 2>/dev/null | grep "^pub" | head -n 1 | cut -d\: -f 5 )
GRIP=$(gpg2 --with-colons --import-options show-only --import /key.asc 2>/dev/null | grep '^grp' | head -n 1 | cut -d\: -f 10 )
echo Using GPG key with ID: ${ID} GRIP: ${GRIP}
# inject the passphrase
@ -34,7 +34,7 @@ gpg2 --batch --yes --import /key.asc
rpm --import /key.asc
# get key CN
NAME=$(gpg --with-colons /key.asc 2>/dev/null | grep "^uid" | head -n 1 | cut -d\: -f 10)
NAME=$(gpg2 --with-colons /key.asc 2>/dev/null | grep "^uid" | head -n 1 | cut -d\: -f 10)
# and output it to rpmmacros
cat <<EOF >~/.rpmmacros