mirror of
https://github.com/km4ack/patmenu2.git
synced 2025-05-28 04:20:10 -07:00
fix #62 issues
This commit is contained in:
parent
4918ed9b6a
commit
fa7bd445f7
@ -121,9 +121,9 @@ fi
|
||||
|
||||
GPSGRID(){
|
||||
CONFIG=$XDG_CONFIG_HOME/pat/config.json
|
||||
RUBY_INSTALLED=$(which ruby)
|
||||
|
||||
if ! hash ruby2.3 2>/dev/null; then
|
||||
echo "Ruby Not found on system"
|
||||
if [ -z "$RUBY_INSTALLED" ]; then
|
||||
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="|" \
|
||||
--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
|
||||
INSTALLRUBY(){
|
||||
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 maidenhead
|
||||
}
|
||||
@ -328,11 +328,13 @@ MANUALGPS() {
|
||||
|
||||
WHO=$(whoami)
|
||||
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 \
|
||||
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
||||
--text="<b>Update Pat Grid</b> by KM4ACK" \
|
||||
--field="Six Character Grid": "$NEWGRID" \
|
||||
--field="Current Grid -------- <b>$CURRENT_GRID</b>":LBL \
|
||||
--button="Update Grid":2 \
|
||||
--button="Cancel":1)
|
||||
BUT=$?
|
||||
|
Loading…
x
Reference in New Issue
Block a user