forked from km4ack/pi-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-check
687 lines (623 loc) · 22 KB
/
app-check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
#!/bin/bash
#this script used to check for apps that need updates
UPDATEFILE=/run/user/$UID/bapupdate.txt
#Delete file if exist
if [ -f $UPDATEFILE ]; then
rm $UPDATEFILE
fi
#create new file
touch $UPDATEFILE
CHECK() {
#----------------------------------------------------#
# Hotspot
#----------------------------------------------------#
HOTSPOT="/usr/bin/autohotspotN"
if [ ! -f "$HOTSPOT" ]; then
echo "HOTSPOT=Not_Installed" >> $UPDATEFILE
else
echo "HOTSPOT=Installed" >> $UPDATEFILE
fi
#remove duplicate HST check
#----------------------------------------------------#
# AX25
#----------------------------------------------------#
if [ ! -d /etc/ax25 ]; then
echo "AX25=Not_Installed" >> $UPDATEFILE
else
echo "AX25=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# GPS
#----------------------------------------------------#
if ! hash gpsd 2>/dev/null; then
echo "GPS=Not_Installed" >> $UPDATEFILE
else
echo "GPS=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# PULSE
#----------------------------------------------------#
if ! hash pavucontrol 2>/dev/null; then
echo "PULSE=Not_Installed" >> $UPDATEFILE
else
echo "PULSE=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# ARDOP
#----------------------------------------------------#
if [ -f ${HOME}/ardop/piardopc ]; then
echo "ARDOP=Installed" >> $UPDATEFILE
else
echo "ARDOP=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# ARDOP GUI
#----------------------------------------------------#
if [ -f ${HOME}/ardop/piARDOP_GUI ]; then
echo "ARDOPGUI=Installed" >> $UPDATEFILE
else
echo "ARDOPGUI=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# JS8Call
#----------------------------------------------------#
if ! hash js8call 2>/dev/null; then
echo "JS8=Not_Installed" >> $UPDATEFILE
else
echo "JS8=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# WSJTX
#----------------------------------------------------#
if ! hash wsjtx 2>/dev/null; then
echo "FT8=Not_Installed" >> $UPDATEFILE
else
echo "FT8=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# CONKY
#----------------------------------------------------#
if [ -f ${HOME}/.conkyrc ]; then
echo "CONKY=Installed" >> $UPDATEFILE
else
echo "CONKY=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# M0IAX
#----------------------------------------------------#
if [ -f /usr/local/bin/JS8CallUtils_v2 ]; then
echo "M0IAX=Installed" >> $UPDATEFILE
else
echo "M0IAX=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# RIG CONTROL - HAMLIB
#----------------------------------------------------#
if ! hash rigctl 2>/dev/null; then
echo "RIG=Not_Installed" >> $UPDATEFILE
else
echo "Checking Rig Control"
RIG=$(rigctl --version | grep Hamlib | sed s/"rigctl(d),\ Hamlib\ "//)
NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download |
grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] |
head -n 1 | awk -F "/" '{print $7}')
if (($(echo "${NEWRIG} ${RIG}" | awk '{print ($1 > $2)}'))); then
echo "RIG=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "RIG=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# FLDIGI
#----------------------------------------------------#
echo "Checking FLDIGI"
if ! hash fldigi 2>/dev/null; then
echo "FLDIGI=Not_Installed" >> $UPDATEFILE
else
FLDIGI=$(fldigi --version | awk 'FNR == 1 {print $2}')
NEWFLDIGI=$(curl -s https://sourceforge.net/projects/fldigi/files/fldigi/ |
grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar" '{print $1}')
if (($(echo "${NEWFLDIGI} ${FLDIGI}" | awk '{print ($1 > $2)}'))); then
echo "FLDIGI=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "FLDIGI=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# FLWRAP
#----------------------------------------------------#
echo "Checking FLWRAP"
if ! hash flwrap 2>/dev/null; then
echo "FLWRAP=Not_Installed" >> $UPDATEFILE
else
FLWRAP=$(flwrap --version | awk 'FNR == 1 {print $2}')
NEWFLWRAP=$(curl -s http://www.w1hkj.com/files/flwrap/ | grep .tar.gz | sed 's/<li><a\ href="//' |
sed 's/">\ flwrap.*$//' | sed 's/flwrap-//' | sed 's/.tar.gz//')
if (($(echo "${NEWFLWRAP} ${FLWRAP}" | awk '{print ($1 > $2)}'))); then
echo "FLWRAP=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "FLWRAP=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# FLRIG
#----------------------------------------------------#
echo "Checking FLRIG"
if ! hash flrig 2>/dev/null; then
echo "FLRIG=Not_Installed" >> $UPDATEFILE
else
FLRIG=$(flrig --version | awk 'FNR == 1 {print $2}')
NEWFLRIG=$(curl -s https://sourceforge.net/projects/fldigi/files/flrig/ |
grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}')
if (($(echo "${NEWFLRIG} ${FLRIG}" | awk '{print ($1 > $2)}'))); then
echo "FLRIG=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "FLRIG=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# FLAMP
#----------------------------------------------------#
echo "Checking FLAMP"
if ! hash flamp 2>/dev/null; then
echo "FLAMP=Not_Installed" >> $UPDATEFILE
else
FLAMP=$(flamp --version | awk 'FNR == 1 {print $2}')
NEWFLAMP=$(curl -s https://sourceforge.net/projects/fldigi/files/flamp/ |
grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}')
if (($(echo "${NEWFLAMP} ${FLAMP}" | awk '{print ($1 > $2)}'))); then
echo "FLAMP=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "FLAMP=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# FLMSG
#----------------------------------------------------#
echo "Checking FLMSG"
if ! hash flmsg 2>/dev/null; then
echo "FLMSG=Not_Installed" >> $UPDATEFILE
else
FLMSG=$(flmsg --version | awk 'FNR == 1 {print $2}')
NEWFLMSG=$(curl -s https://sourceforge.net/projects/fldigi/files/flmsg/ |
grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}')
if (($(echo "${NEWFLMSG} ${FLMSG}" | awk '{print ($1 > $2)}'))); then
echo "FLMSG=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "FLMSG=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# FLNET
#----------------------------------------------------#
echo "Checking FLNET"
if ! hash flnet 2>/dev/null; then
echo "FLNET=Not_Installed" >> $UPDATEFILE
else
FLNET=$(flnet --version | awk 'FNR == 1 {print $2}')
NEWFLNET=$(curl -s https://sourceforge.net/projects/fldigi/files/flnet/ |
grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar" '{print $1}')
if (($(echo "${NEWFLNET} ${FLNET}" | awk '{print ($1 > $2)}'))); then
echo "FLNET=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "FLNET=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# Pat Winlink
#----------------------------------------------------#
echo "Checking Pat Winlink"
if ! hash pat 2>/dev/null; then
echo "PAT=Not_Installed" >> $UPDATEFILE
else
PAT=$(pat version | awk '{print $2}' | sed 's/v//' | sed 's/0\.//')
NEWPATV=$(curl -s https://github.com/la5nta/pat/releases | grep armhf | head -1 | sed 's/.*pat_/pat_/' | sed 's/<\/a>.*$//')
NEWPAT=$(echo ${NEWPATV} | sed 's/pat_//' | sed 's/_linux_armhf.deb//' | sed 's/0\.//')
VERTEST=$(echo "${NEWPAT}>${PAT}" | bc)
if [ "$VERTEST" = 1 ]; then
echo "PAT=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "PAT=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# CHRIP
#----------------------------------------------------#
echo "Checking Chirp"
if ! hash chirpw 2>/dev/null; then
echo "CHIRP=Not_Installed" >> $UPDATEFILE
else
CP=$(chirpw --version)
CHIRP=$(echo ${CP} | awk '{ print $2 }' | sed 's/daily-//')
NEWCHIRP=$(curl -s https://trac.chirp.danplanet.com/chirp_daily/LATEST/ |
grep .tar.gz | awk -F 'chirp-daily-' '{print $2}' | head -c 8)
if (($(echo "${NEWCHIRP} ${CHIRP}" | awk '{print ($1 > $2)}'))); then
echo "CHIRP=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "CHIRP=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# DIREWOLF
#----------------------------------------------------#
echo "Checking Direwolf"
if ! hash direwolf 2>/dev/null; then
echo "DIRE=Not_Installed" >> $UPDATEFILE
else
DIRE=$(direwolf -S -t 0 | head -1 | sed 's/Dire\ Wolf\ version\ //')
wget -P /tmp/ https://raw.githubusercontent.com/wb2osz/direwolf/master/CHANGES.md >/dev/null 2>&1
NEWDIRE=$(cat /tmp/CHANGES.md | head -5 | tail -1 | awk '{ print $3 }')
if (($(echo "${NEWDIRE} ${DIRE}" | awk '{print ($1 > $2)}'))); then
echo "DIRE=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "DIRE=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# Pat Menu
#----------------------------------------------------#
echo "Checking Pat Menu"
if [ ! -d ${HOME}/patmenu2 ]; then
echo "PATMENU=Not_Installed" >> $UPDATEFILE
else
cd ${HOME}/patmenu2/ || ! echo "Failure"
wget -O ${HOME}/patmenu2/latest https://raw.githubusercontent.com/km4ack/patmenu2/master/changelog >/dev/null 2>&1
LATEST=$(cat ${HOME}/patmenu2/latest | grep '^release' | sed 's/release=//')
CURRENT=$(cat ${HOME}/patmenu2/changelog | grep '^release' | sed 's/release=//')
rm ${HOME}/patmenu2/latest >/dev/null 2>&1
if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then
echo "PATMENU=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "PATMENU=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# Hot Spot Tools
#----------------------------------------------------#
if [ ! -d ${HOME}/hotspot-tools2 ]; then
echo "HSTOOLS=Not_Installed" >> $UPDATEFILE
else
CURRENT=$(cat ${HOME}/hotspot-tools2/changelog | grep version= | sed 's/version=//')
LATEST=$(curl -s https://raw.githubusercontent.com/km4ack/hotspot-tools2/master/changelog | grep version= | sed 's/version=//')
if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then
echo "HSTOOLS=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "HSTOOLS=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# GARIM
#----------------------------------------------------#
echo "Checking GARIM"
if ! hash garim 2>/dev/null; then
echo "GARIM=Not_Installed" >> $UPDATEFILE
else
GARIM=$(garim --version | head -n1 | awk -F ' ' '{print $2}')
NEWGARIM=$(curl -s https://www.whitemesa.net/garim/garim.html | grep -m 1 \
"armv7l.tar.gz" | awk -F '-' '{print $2}')
if (($(echo "${NEWGARIM} ${GARIM}" | awk '{print ($1 > $2)}'))); then
echo "GARIM=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "GARIM=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# XASTIR
#----------------------------------------------------#
echo "Checking Xastir"
if ! hash xastir 2>/dev/null; then
echo "XASTIR=Not_Installed" >> $UPDATEFILE
else
LATESTXAS=$(curl -s https://github.com/Xastir/Xastir | grep Release- | head -1 | sed 's/.*Release-//;s/">//')
CURRENTXAS=$(xastir -V | sed 's/Xastir V//;s/(.*//;/^\s*$/d')
if (($(echo "${LATESTXAS} ${CURRENTXAS}" | awk '{print ($1 > $2)}'))); then
echo "XASTIR=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "XASTIR=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# YAAC
#----------------------------------------------------#
YAAC="${HOME}/YAAC"
echo "Checking YAAC for updates"
if [ ! -d "$YAAC" ]; then
echo "YAAC=Not_Installed" >> $UPDATEFILE
else
CURYAAC=$(java -jar ${HOME}/YAAC/YAAC.jar -version | grep beta | sed 's/.*beta//;s/(.*//')
wget -q https://sourceforge.net/projects/yetanotheraprsc/files/YAACBuildLabel.txt -O /run/user/${UID}/latestyaac.txt
LATESTYAAC=$(cat /run/user/${UID}/latestyaac.txt | sed 's/1.0-beta//;s/(.*//')
if (($(echo "${LATESTYAAC} ${CURYAAC}" | awk '{print ($1 > $2)}'))); then
echo "YAAC=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "YAAC=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# PYQSO
#----------------------------------------------------#
if ! hash pyqso 2>/dev/null; then
echo "PYQSO=Not_Installed" >> $UPDATEFILE
else
echo "PYQSO=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# QSSTV
#----------------------------------------------------#
if ! hash qsstv 2>/dev/null; then
echo "QSSTV=Not_Installed" >> $UPDATEFILE
else
echo "QSSTV=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# GRIDTRACKER
#----------------------------------------------------#
GT="${HOME}/GridTracker"
if [ ! -d "$GT" ]; then
echo "GRIDTRACK=Not_Installed" >> $UPDATEFILE
else
echo "GRIDTRACK=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# PROPAGATION
#----------------------------------------------------#
if ! hash voacapl 2>/dev/null; then
echo "PROP=Not_Installed" >> $UPDATEFILE
else
echo "PROP=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# CQRLOG
#----------------------------------------------------#
if ! hash cqrlog 2>/dev/null; then
echo "CQRLOG=Not_Installed" >> $UPDATEFILE
else
echo "CQRLOG=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# EES
#----------------------------------------------------#
if [ -f /var/www/html/email.php ]; then
echo "EES=Installed" >> $UPDATEFILE
else
echo "EES=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# Pi-APRS
#----------------------------------------------------#
if [ -d ${HOME}/Pi-APRS ]; then
echo "PIAPRS=Installed" >> $UPDATEFILE
else
echo "PIAPRS=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# Temp Convert
#----------------------------------------------------#
if [ -f ${HOME}/bin/converttemp ]; then
echo "TEMPCONVERT=Installed" >> $UPDATEFILE
else
echo "TEMPCONVERT=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# GPARTED
#----------------------------------------------------#
if ! hash gparted 2>/dev/null; then
echo "GPARTED=Not_Installed" >> $UPDATEFILE
else
echo "GPARTED=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# DIPOLE CALCULATOR
#----------------------------------------------------#
if [ -f ${HOME}/bin/dipole ]; then
echo "DIPOLE=Installed" >> $UPDATEFILE
else
echo "DIPOLE=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# SHOWLOG | Log file viewer
#----------------------------------------------------#
if [ -f ${HOME}/bin/showlog ]; then
echo "SHOWLOG=Installed" >> $UPDATEFILE
else
echo "SHOWLOG=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# Call Sign Lookup GETCALL
#----------------------------------------------------#
if [ -f ${HOME}/bin/getcall ]; then
echo "CALLSIGN=Installed" >> $UPDATEFILE
else
echo "CALLSIGN=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# HamClock
#----------------------------------------------------#
HAMCLOCK=$(ls /usr/local/bin | grep hamclock)
if [ -n "$HAMCLOCK" ]; then
echo "HAMCLOCK=Installed" >> $UPDATEFILE
else
echo "HAMCLOCK=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# Real Time Clock
#----------------------------------------------------#
echo "RTC=Unknown" >> $UPDATEFILE
#----------------------------------------------------#
# Gpredict
#----------------------------------------------------#
if ! hash gpredict 2>/dev/null; then
echo "GPREDICT=Not_Installed" >> $UPDATEFILE
else
echo "GPREDICT=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# TQSL
#----------------------------------------------------#
if ! hash tqsl 2>/dev/null; then
echo "TQSL=Not_Installed" >> $UPDATEFILE
else
echo "TQSL=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# PISTATS
#----------------------------------------------------#
if ! hash pistats 2>/dev/null; then
echo "PISTATS=Not_Installed" >> $UPDATEFILE
else
echo "PISTATS=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# XLOG CHECK
#----------------------------------------------------#
if ! hash xlog 2>/dev/null; then
echo "XLOG=Not_Installed" >> $UPDATEFILE
else
XLOGCUR=$(xlog -version | sed 's/xlog\ version\ //')
XLOGLATEST=$(curl -s https://download.savannah.nongnu.org/releases/xlog/ |
grep "2.[0-9].[0-9][0-9].tar" | sort | tail -1 | sed 's/.*xlog/xlog/' | sed 's/.sig.*$//' |
sed 's/xlog-//' | sed 's/.tar.gz//')
if (($(echo "${XLOGLATEST} ${XLOGCUR}" | awk '{print ($1 > $2)}'))); then
echo "XLOG=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "XLOG=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# JTDX
#----------------------------------------------------#
if ! hash jtdx 2>/dev/null; then
echo "JTDX=Not_Installed" >> $UPDATEFILE
else
echo "JTDX=Installed" >> $UPDATEFILE
fi
}
#----------------------------------------------------#
# TELNET
#----------------------------------------------------#
if ! hash telnet 2>/dev/null; then
echo "TEL=Not_Installed" >> $UPDATEFILE
else
echo "TEL=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# piQtTermTCP
#----------------------------------------------------#
if [ -f /usr/local/bin/piQtTermTCP ]; then
echo "PITERM=Installed" >> $UPDATEFILE
else
echo "PITERM=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# Security Tools
#----------------------------------------------------#
if [ -f /usr/local/bin/securefile ]; then
echo "SECURITY=Installed" >> $UPDATEFILE
else
echo "SECURITY=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# YGATE
#----------------------------------------------------#
YGATE="${HOME}/bin/ygate.py"
if [ ! -f "$YGATE" ]; then
echo "YGATE=Not_Installed" >> $UPDATEFILE
else
echo "YGATE=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# BPQ
#----------------------------------------------------#
BPQ="${HOME}/linbpq/linbpq"
if [ ! -f "$BPQ" ]; then
echo "BPQ=Not_Installed" >> $UPDATEFILE
else
echo "BPQ=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# Battery Test Script :: BATT
#----------------------------------------------------#
BATT="${HOME}/bin/batt-test"
if [ ! -f "$BATT" ]; then
echo "BATT=Not_Installed" >> $UPDATEFILE
else
echo "BATT=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# VNC Viewer
#----------------------------------------------------#
if ! hash vncviewer 2>/dev/null; then
echo "VNC=Not_Installed" >> $UPDATEFILE
else
echo "VNC=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# XYGRIB Viewer
#----------------------------------------------------#
if [ -f /usr/bin/XyGrib ]; then
echo "XYGRIB=Installed" >> $UPDATEFILE
else
echo "XYGRIB=Not_Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# GPS UPDATE TOOL
#----------------------------------------------------#
echo "Checking GPS Update Tool"
if [ ! -f ${HOME}/bin/gpsupdate ]; then
echo "GPSUPDATE=Not_Installed" >> $UPDATEFILE
else
GPSUPDATE=$(grep VERSION= ${HOME}/bin/gpsupdate | sed 's/VERSION=//')
NEWGPSUPDATE=$(curl -s https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsupdate | grep VERSION= | sed 's/VERSION=//')
if (($(echo "${NEWGPSUPDATE} ${GPSUPDATE}" | awk '{print ($1 > $2)}'))); then
echo "GPSUPDATE=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "GPSUPDATE=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# Grid Calc
#----------------------------------------------------#
echo "Checking Grid Calc"
if [ ! -f $HOME/bin/grid-calc ]; then
echo "GRIDCALC=Not_Installed" >> $UPDATEFILE
else
CURRENT=$(grep VERSION $HOME/bin/grid-calc | head -1 | sed 's/VERSION=//')
LATEST=$(curl -s https://raw.githubusercontent.com/km4ack/pi-scripts/master/grid-calc | grep VERSION | head -1 | sed 's/VERSION=//')
if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then
echo "GRIDCALC=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "GRIDCALC=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# HAMRS
#----------------------------------------------------#
if [ ! -f /usr/local/bin/hamrs ]; then
echo "HAMRS=Not_Installed" >> $UPDATEFILE
else
echo "HAMRS=Installed" >> $UPDATEFILE
fi
#----------------------------------------------------#
# PacketSearch
#----------------------------------------------------#
echo "Checking Packet Search"
if [ ! -f $HOME/bin/packetsearch ]; then
echo "PACKETSEARCH=Not_Installed" >> $UPDATEFILE
else
PACKETSEARCH=$(grep VERSION $HOME/bin/packetsearch | sed 's/VERSION=//')
NEWPACKETSEARCH=$(curl -s https://raw.githubusercontent.com/km4ack/pi-scripts/master/packetsearch | grep VERSION | sed 's/VERSION=//')
if (($(echo "${NEWFLNET} ${FLNET}" | awk '{print ($1 > $2)}'))); then
echo "PACKETSEARCH=NEEDS-UPDATE" >> $UPDATEFILE
else
echo "PACKETSEARCH=is_latest_version" >> $UPDATEFILE
fi
fi
#----------------------------------------------------#
# piQtSoundModem
#----------------------------------------------------#
if [ -f /usr/local/bin/piQtSoundModem ]; then
echo "QTSOUND=Installed" >> $UPDATEFILE
else
echo "QTSOUND=Not_Installed" >> $UPDATEFILE
fi
CHECK