This repository has been 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
/
Copy pathsetup
63 lines (47 loc) · 1.42 KB
/
setup
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
#!/bin/bash
#script to setup patmenu system after downloaded
#20191117 KM4ACK
if ! hash yad 2>/dev/null; then
sudo apt install -y yad
fi
if ! hash jq 2>/dev/null; then
sudo apt install -y jq
fi
#set notepad editor based on release
VERSION=$(cat /etc/os-release | grep VERSION_ID | sed 's/VERSION_ID="//' | sed 's/"//')
echo $VERSION
if [ $VERSION == '9' ]
then
EDITOR=leafpad
elif [ $VERSION == '10' ]
then
EDITOR=mousepad
fi
cd $HOME/patmenu
chmod +x autopat catalog findardop getardoplist patlogin patmenu-new start-pat2m start-pat-ardop stop-modems uninstall update auto-download alias-add alias-del pat-manage alias-add-packet restore-config changeconf menu-manage email-bkup email-restore
#check if evince is installed
EVINCE=$(dpkg --get-selections | grep -w "evince")
if [ -z "$EVINCE" ]
then
sudo apt-get install -y evince
else
echo "evince is already installed"
fi
#check to see if ardop list exist. get if needed.
if [ -f $HOME/patmenu/ardop-list/ardoplist.txt ]
then
echo "ARDOP list exist. No need to download"
else
#run initial getardoplist
echo "Please wait while the latest"
echo "Gateway list is downloaded"
$HOME/patmenu/getardoplist
fi
#create symlink on desktop
ln -sf $HOME/patmenu/patmenu-new $HOME/Desktop/Pat-Menu
#create symlink for patmenu
sudo ln -sf $HOME/patmenu/patmenu-new /usr/local/bin/patmenu
#remove a few files
rm $HOME/patmenu/README.md
rm $HOME/patmenu/setup
#$EDITOR $HOME/patmenu/readme &