fix bug when no patch selected

pull/290/head
KM4ACK 2021-08-08 20:45:57 -05:00
rodzic fd647bbbcd
commit bc20872b6d
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -22,6 +22,7 @@ yad --title="Build a Pi Patch Tool" --width=500 --height=500 \
--button="Apply Patch":2)
BUT=$?
PATCH=$(echo ${INFO} | awk -F "|" '{print $1}')
#cleanup and exit upon user request
@ -32,6 +33,17 @@ rm -rf $TEMP $DIR/pi-build
${MYPATH}/update && exit
fi
#check to verify that a patch has been selected
#Thank Ken, NB6S for catching this bug!
if [ -z $INFO ]; then
yad --form --width=500 --text-align=center --center --title="Build-a-Pi Patch Tool" --text-align=center \
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
--text="<b>Please select a patch\rand try again.</b>" \
--button=gtk-close
MENU
fi
#verify patch has not been applied already
echo "getting patchname"
PATCHNAME=$(grep PATCHNAME= $DIR/pi-build/patch/${PATCH} | sed 's/PATCHNAME=//')