forked from km4ack/patmenu2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
60 lines (46 loc) · 1.25 KB
/
Copy pathsetup
File metadata and controls
60 lines (46 loc) · 1.25 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
#!/bin/bash
#install script patmenu2
#20200511 km4ack
MYPATH=$HOME/patmenu2
BKDIR=$HOME/Desktop/config-bkups
NEWCONFIG=$HOME/Desktop/test.txt
#get depends if needed.
sudo apt-get update
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
if [ -f $HOME/patmenu/config ]; then
#get patmenu config file and copy to patmenu2
cp $HOME/patmenu/config $HOME/patmenu2/config
#create backup folder and copy any user config files from patmenu1
mkdir -p $BKDIR
cp $HOME/patmenu/*config* $BKDIR
#remove restore script that gets copied with above command
rm $BKDIR/restore-config
#remove old patmenu
rm -rf $HOME/patmenu
#remove old shortcut if exist
if [ -L $HOME/Desktop/Pat-Menu ]; then
rm $HOME/Desktop/Pat-Menu
fi
fi
#create new desktop link
cat <<EOF > /run/user/$UID/patmenu.desktop
[Desktop Entry]
Name=Pat Menu
GenericName=Amateur Radio Digital Modem
Comment=Amateur Radio Sound Card Communications
Exec=/home/`whoami`/patmenu2/patmenu
Icon=/home/`whoami`/patmenu2/pmlogo.png
Terminal=false
Type=Application
Categories=Network;HamRadio;
EOF
sudo cp /run/user/$UID/patmenu.desktop /usr/share/applications/patmenu.desktop
#download RMS List
$MYPATH/getardoplist
#remove this script
rm $MYPATH/setup