First GRO stamp, then GPG

This commit is contained in:
Bandie 2020-06-01 18:04:30 +02:00
parent 5ba1310bba
commit 77fb952161
Signed by: Bandie
GPG Key ID: 843D7FA93BA46312
1 changed files with 17 additions and 7 deletions

24
start
View File

@ -69,7 +69,7 @@ function confirm() {
} }
function jhpAskForField() { function jhpAskForField() {
text="Please choose a free field on the passport.\n text="$1: Please choose a free field on the passport.\n
------------------\n ------------------\n
| Archievements |\n | Archievements |\n
==================\n ==================\n
@ -93,7 +93,7 @@ function jhpAskForField() {
} }
function jhpPrintGPG() { function jhpPrintGPG() {
jhpAskForField jhpAskForField "GPG fingerprint"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
diaBox "Insert Passport" "Please insert passport (Archivements) into the printer." diaBox "Insert Passport" "Please insert passport (Archivements) into the printer."
cd jhp cd jhp
@ -114,7 +114,7 @@ function jhpPrintReg() {
} }
function jhpGROStamp() { function jhpGROStamp() {
jhpAskForField jhpAskForField "GRO stamp"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
diaBox "Insert Passport" "Please insert passport (Archivements) into the printer." diaBox "Insert Passport" "Please insert passport (Archivements) into the printer."
cd jhp cd jhp
@ -169,6 +169,12 @@ function jhpReg() {
confirm=" Forename: $FNAME\n Surename: $SNAME\n Planet: $PLANET" confirm=" Forename: $FNAME\n Surename: $SNAME\n Planet: $PLANET"
ynBox "GRO Stamp" "Does this being wants to have a GRO stamp?"
if [ $? -eq 0 ]; then
STAMP=true
else
STAMP=false
fi
ynBox "GPG" "Does the being have a GPG key to register?" ynBox "GPG" "Does the being have a GPG key to register?"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -187,8 +193,8 @@ function jhpmenu() {
dialog --backtitle "$BT" \ dialog --backtitle "$BT" \
--menu "Select ID type:" 14 40 3 \ --menu "Select ID type:" 14 40 3 \
1 "Registration" \ 1 "Registration" \
2 "GPG" \ 2 "GRO Stamp" \
3 "GRO Stamp" \ 3 "GPG" \
9 "Back" 2> $TMP 9 "Back" 2> $TMP
choice=$(cat $TMP) choice=$(cat $TMP)
@ -197,17 +203,21 @@ function jhpmenu() {
1) jhpReg 1) jhpReg
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
jhpPrintReg jhpPrintReg
if [ "$STAMP" == "true" ]; then
jhpGROStamp
fi
if [ -n "$FP" ]; then if [ -n "$FP" ]; then
jhpPrintGPG jhpPrintGPG
fi fi
fi fi
;; ;;
2) jhpGPG 2) jhpGROStamp
;;
3) jhpGPG
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
jhpPrintGPG jhpPrintGPG
fi fi
;; ;;
3) jhpGROStamp
esac esac
unset FNAME unset FNAME