This repository was archived by the owner on Jun 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpatmenu-new
More file actions
133 lines (126 loc) · 2.65 KB
/
patmenu-new
File metadata and controls
133 lines (126 loc) · 2.65 KB
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
#!/bin/bash
# Pat menu system
#20191115 km4ack
PS3='Please enter your choice: '
source $HOME/patmenu/config
VER=$(cat $HOME/patmenu/release | grep release= | sed 's/release=//')
if [ $MYCALLSIGN = "N0CALL" ]
then
echo "Please see the config file before running Pat Menu"
echo "The config file is found in the ~/patmenu directory"
echo "See this video for more information https://youtu.be/unal5dCKGXk"
sleep 10
exit 0
fi
PATAUTO () {
clear;echo;echo
echo "Which band would you like to use?"
echo "20, 30, 40, or 80"
read BAND
if [ -z $BAND ]
then
echo "band cannot be blank"
sleep 2
PATAUTO
fi
if [ $BAND = "20" ] || [ $BAND = "30" ] || [ $BAND = "40" ] || [ $BAND = "80" ]
then
echo
else
echo "Only 20,30,40, or 80 are available"
echo "Please try again"
sleep 2
PATAUTO
fi
echo "What is the max distance you wish to try?"
read MAX
if [ -z $MAX ]
then
echo "max distance cannot be blank"
sleep 2
PATAUTO
fi
echo "What is the minimum distance you wish to try?"
read MIN
if [ $MIN -gt $MAX ]
then
echo "Minimum distance can't be greater than maximum distance"
echo "Please try again"
sleep 2
PATAUTO
fi
echo "You have chosen to use "$BAND"M with a minimum distance of "$MIN"km"
echo "and a maximum distance of "$MAX"km"
read -p "Is this correct? y/n/exit :" ANS
case $ANS in
y|Y) echo "Please standby"
$HOME/patmenu/autopat $MAX $BAND $MIN
MAINMENU
;;
n|N) PATAUTO
;;
"exit") MAINMENU
;;
*) echo "Invalid option. Try again"
sleep 2
PATAUTO
;;
esac
}
#catalog function
CATALOG () {
clear;echo;echo
$HOME/patmenu/catalog
MAINMENU
}
#find ardop function
FINDARDOP () {
clear;echo;echo
$HOME/patmenu/findardop
MAINMENU
}
MAINMENU () {
clear;echo;echo;echo
echo "Pat Menu v"$VER" by KM4ACK"
echo
options=("Manage Pat" "Start ARDOP" "Start Packet" "Find Ardop" "Pat Auto Connect" "Pat Catalog" "Stop Modems" "Manage Pat Menu" "Exit")
select opt in "${options[@]}"
do
case $opt in
"Manage Pat")
$HOME/patmenu/pat-manage
MAINMENU
;;
"Start ARDOP")
$HOME/patmenu/start-pat-ardop
MAINMENU
;;
"Start Packet")
$HOME/patmenu/start-pat2m
MAINMENU
;;
"Find Ardop")
FINDARDOP
;;
"Pat Auto Connect")
PATAUTO
;;
"Pat Catalog")
CATALOG
;;
"Stop Modems")
$HOME/patmenu/stop-modems
MAINMENU
;;
"Manage Pat Menu")
$HOME/patmenu/menu-manage
MAINMENU
;;
"Exit")
exit 0
;;
*) echo "invalid option $REPLY";;
esac
done
}
MAINMENU