kopia lustrzana https://github.com/km4ack/pi-build
fix bug when no patch selected
rodzic
fd647bbbcd
commit
bc20872b6d
12
patch-menu
12
patch-menu
|
@ -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=//')
|
||||
|
|
Ładowanie…
Reference in New Issue