Skip to content

Commit 6b814e1

Browse files
committed
1 parent 3d98f8f commit 6b814e1

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

functions/additional.function

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,16 @@ PAT() {
2626
fi
2727

2828
if [ `getconf LONG_BIT` = '64' ]; then
29-
30-
#reference:
31-
#https://www.jeremymorgan.com/tutorials/raspberry-pi/install-go-raspberry-pi/
32-
#https://github.com/la5nta/pat/wiki/Building-from-source
33-
#https://cqdeks4td.blogspot.com/2021/11/installing-pat-open-source-winlink.html
34-
35-
#install golang needed for pat build
36-
cd
37-
wget https://go.dev/dl/go1.17.7.linux-arm64.tar.gz
38-
sudo tar -C /usr/local -xzf go1.17.7.linux-arm64.tar.gz
39-
rm go1.17.7.linux-arm64.tar.gz
40-
41-
echo "PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
42-
echo "GOPATH=$HOME/go" >> $HOME/.profile
43-
44-
source $HOME/.profile
45-
46-
#download/build latest pat
47-
cd
48-
git clone https://github.com/la5nta/pat
49-
cd pat
50-
./make.bash libax25
51-
./make.bash
52-
53-
sudo cp $HOME/pat/debian/pat@.service /lib/systemd/system/
54-
sudo cp $HOME/pat/pat /usr/bin/
55-
rm -rf $HOME/pat
29+
#install deb file for 64 bit systems
30+
NEWPATV=$(curl -s https://github.com/la5nta/pat/releases | grep arm64 | head -1 | sed 's/.*pat_/pat_/' | sed 's/<\/a>.*$//')
31+
NEWPAT=$(echo ${NEWPATV} | sed 's/pat_//' | sed 's/_linux_arm64.deb//' | sed 's/0\.//')
32+
echo "new pat v ${NEWPATV}"
33+
echo "new pat ${NEWPAT}"
34+
wget --tries 2 --connect-timeout=60 https://github.com/la5nta/pat/releases/download/v0.${NEWPAT}/${NEWPATV}
35+
sudo dpkg -i ${DIR}/${NEWPATV}
36+
5637
else
38+
5739
#install deb file for 32 bit systems
5840
NEWPATV=$(curl -s https://github.com/la5nta/pat/releases | grep armhf | head -1 | sed 's/.*pat_/pat_/' | sed 's/<\/a>.*$//')
5941
NEWPAT=$(echo ${NEWPATV} | sed 's/pat_//' | sed 's/_linux_armhf.deb//' | sed 's/0\.//')
@@ -100,6 +82,36 @@ PAT() {
10082
mv ${DIR}/config.json ${HOME}/.wl2k/
10183
fi
10284

85+
PAT_OLD_SOURCE_INSTALL() {
86+
#This code is left for reference. This was used ot build pat from source when 64bit Pi OS was first released. 20220922
87+
#reference:
88+
#https://www.jeremymorgan.com/tutorials/raspberry-pi/install-go-raspberry-pi/
89+
#https://github.com/la5nta/pat/wiki/Building-from-source
90+
#https://cqdeks4td.blogspot.com/2021/11/installing-pat-open-source-winlink.html
91+
92+
#install golang needed for pat build
93+
cd
94+
wget https://go.dev/dl/go1.17.7.linux-arm64.tar.gz
95+
sudo tar -C /usr/local -xzf go1.17.7.linux-arm64.tar.gz
96+
rm go1.17.7.linux-arm64.tar.gz
97+
98+
echo "PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
99+
echo "GOPATH=$HOME/go" >> $HOME/.profile
100+
101+
source $HOME/.profile
102+
103+
#download/build latest pat
104+
cd
105+
git clone https://github.com/la5nta/pat
106+
cd pat
107+
./make.bash libax25
108+
./make.bash
109+
110+
sudo cp $HOME/pat/debian/pat@.service /lib/systemd/system/
111+
sudo cp $HOME/pat/pat /usr/bin/
112+
rm -rf $HOME/pat
113+
}
114+
103115
}
104116
##################################
105117
# PAT MENU

0 commit comments

Comments
 (0)