mirror of
https://github.com/km4ack/patmenu2.git
synced 2025-06-03 15:30:08 -07:00
fix #62 issues
This commit is contained in:
parent
4918ed9b6a
commit
fa7bd445f7
@ -121,9 +121,9 @@ fi
|
|||||||
|
|
||||||
GPSGRID(){
|
GPSGRID(){
|
||||||
CONFIG=$XDG_CONFIG_HOME/pat/config.json
|
CONFIG=$XDG_CONFIG_HOME/pat/config.json
|
||||||
|
RUBY_INSTALLED=$(which ruby)
|
||||||
|
|
||||||
if ! hash ruby2.3 2>/dev/null; then
|
if [ -z "$RUBY_INSTALLED" ]; then
|
||||||
echo "Ruby Not found on system"
|
|
||||||
yad --form --width=300 --text-align=center --center --title="Ruby not Found" --text-align=center \
|
yad --form --width=300 --text-align=center --center --title="Ruby not Found" --text-align=center \
|
||||||
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
||||||
--text="Ruby is needed to read GPS data but not found installed on your system. Would you like to install it now?" \
|
--text="Ruby is needed to read GPS data but not found installed on your system. Would you like to install it now?" \
|
||||||
@ -136,7 +136,7 @@ BUT=$?
|
|||||||
elif [ $BUT = 2 ]; then
|
elif [ $BUT = 2 ]; then
|
||||||
INSTALLRUBY(){
|
INSTALLRUBY(){
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y ruby2.3
|
sudo apt-get install -y ruby2.5
|
||||||
sudo gem install gpsd_client
|
sudo gem install gpsd_client
|
||||||
sudo gem install maidenhead
|
sudo gem install maidenhead
|
||||||
}
|
}
|
||||||
@ -328,11 +328,13 @@ MANUALGPS() {
|
|||||||
|
|
||||||
WHO=$(whoami)
|
WHO=$(whoami)
|
||||||
CONFIG=$XDG_CONFIG_HOME/pat/config.json
|
CONFIG=$XDG_CONFIG_HOME/pat/config.json
|
||||||
|
CURRENT_GRID=$(grep locator $CONFIG | sed 's/"locator": "//;s/ //g;s/",//')
|
||||||
|
|
||||||
GRID=$(yad --form --width=400 --text-align=center --center --title="Set Grid" --text-align=center \
|
GRID=$(yad --form --width=400 --text-align=center --center --title="Set Grid" --text-align=center \
|
||||||
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
||||||
--text="<b>Update Pat Grid</b> by KM4ACK" \
|
--text="<b>Update Pat Grid</b> by KM4ACK" \
|
||||||
--field="Six Character Grid": "$NEWGRID" \
|
--field="Six Character Grid": "$NEWGRID" \
|
||||||
|
--field="Current Grid -------- <b>$CURRENT_GRID</b>":LBL \
|
||||||
--button="Update Grid":2 \
|
--button="Update Grid":2 \
|
||||||
--button="Cancel":1)
|
--button="Cancel":1)
|
||||||
BUT=$?
|
BUT=$?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user