parent
ace3997da2
commit
cb0f60b289
6
run.sh
6
run.sh
@ -22,8 +22,8 @@ echo "${PLUGIN_GPG_KEY}" > /key.asc
|
|||||||
eval $(gpg-agent --daemon --allow-preset-passphrase)
|
eval $(gpg-agent --daemon --allow-preset-passphrase)
|
||||||
|
|
||||||
# retrieving key ID and GRIP
|
# retrieving key ID and GRIP
|
||||||
ID=$(gpg --with-colons /key.asc 2>/dev/null | grep "^sec" | head -n 1 | cut -d\: -f 5 )
|
ID=$(gpg2 --with-colons /key.asc 2>/dev/null | grep "^pub" | 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 )
|
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}
|
echo Using GPG key with ID: ${ID} GRIP: ${GRIP}
|
||||||
|
|
||||||
# inject the passphrase
|
# inject the passphrase
|
||||||
@ -34,7 +34,7 @@ gpg2 --batch --yes --import /key.asc
|
|||||||
rpm --import /key.asc
|
rpm --import /key.asc
|
||||||
|
|
||||||
# get key CN
|
# 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
|
# and output it to rpmmacros
|
||||||
cat <<EOF >~/.rpmmacros
|
cat <<EOF >~/.rpmmacros
|
||||||
|
Loading…
x
Reference in New Issue
Block a user