Merge pull request #322 from km4ack/dev

Dev
pull/323/head
KM4ACK 2021-10-22 11:11:28 -05:00 zatwierdzone przez GitHub
commit 66d14079e4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
17 zmienionych plików z 171 dodań i 86 usunięć

Wyświetl plik

@ -25,6 +25,7 @@ TEMPCRON=${MYPATH}/cron.tmp
DIR=${MYPATH}/temp DIR=${MYPATH}/temp
WHO=$(whoami) WHO=$(whoami)
VERSION=$(grep "version=" ${MYPATH}/changelog | sed 's/version=//') VERSION=$(grep "version=" ${MYPATH}/changelog | sed 's/version=//')
DATE=$(date)
FINISH() { FINISH() {
if [ -f "${BASE}" ]; then if [ -f "${BASE}" ]; then
@ -266,14 +267,12 @@ if [ -n "${GPSINSTALL}" ]; then
yad --center --height="300" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \ yad --center --height="300" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \
--image ${LOGO} --window-icon=${LOGO} --image-on-top \ --image ${LOGO} --window-icon=${LOGO} --image-on-top \
--text="\r\r\r\r\r<b><big>Connect your GPS to the pi</big></b>" \ --text="\r\r\r\r\r<b><big>Connect your GPS to the pi</big></b>" \
--button="Exit":1 \
--button="Continue":2 --button="Continue":2
BUT=$? BUT=$?
if [ ${BUT} = 1 ] || [ ${BUT} = 252 ]; then
exit
fi
USB=$(ls /dev/serial/by-id) USB=$(ls /dev/serial/by-id)
USB=$(echo "NONE $USB") #see https://github.com/km4ack/pi-build/issues/293
USB=$(echo $USB | sed "s/\s/|/g") USB=$(echo $USB | sed "s/\s/|/g")
GPS=$(yad --center --height="600" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \ GPS=$(yad --center --height="600" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \
@ -508,6 +507,7 @@ sudo mv build-a-pi.desktop /usr/share/applications/
# Install Base Apps # Install Base Apps
##################################### #####################################
touch ${RB} touch ${RB}
echo "INITIAL=\"build date $DATE version $VERSION\"" >> ${RB}
source ${FUNCTIONS}/base.function source ${FUNCTIONS}/base.function
while read i; do while read i; do
$i $i

Wyświetl plik

@ -1,4 +1,25 @@
version=3.1.0 version=3.1.1
3.1.1 Remove echo statement from patch menu script.
Add libusb-1.0 and libusb-dev to hamlib build section https://github.com/km4ack/pi-build/issues/296
fix FLAMP install - https://github.com/km4ack/pi-build/issues/301
fix BAP menu - https://github.com/km4ack/pi-build/issues/302
fix pat secutiry issue - https://github.com/km4ack/pi-build/issues/299
add build/update logging - https://github.com/km4ack/pi-build/issues/294
add "none" to GPS selection - https://github.com/km4ack/pi-build/issues/293
fix spelling of i2c - https://github.com/km4ack/pi-build/issues/289
fix linbpq help file - https://github.com/km4ack/pi-build/issues/287
fix python-suds error - https://github.com/km4ack/pi-build/issues/272
fix conky awk error - https://github.com/km4ack/pi-build/issues/306
fix gridtracker link - https://github.com/km4ack/pi-build/issues/314
fix gridtracker install error - https://github.com/km4ack/pi-build/issues/286
fix hamrs install bug - https://github.com/km4ack/pi-build/issues/288
fix gpsd issue - https://github.com/km4ack/pi-build/issues/316
resolve issue 199 - https://github.com/km4ack/pi-build/issues/199
remove exit option for GPS - https://github.com/km4ack/pi-build/issues/318
fix multiple chrony.conf entries - https://github.com/km4ack/pi-build/issues/317
fix FLDIGI download link
3.1.0 add Build a Pi Patch Tool 3.1.0 add Build a Pi Patch Tool

Wyświetl plik

@ -51,7 +51,7 @@ ${font Arial:bold:size=08}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2}
${font Arial:bold:size=08}${color White}Frequency $alignr${freq_g cpu0}Ghz ${font Arial:bold:size=08}${color White}Frequency $alignr${freq_g cpu0}Ghz
${font Arial:bold:size=08}${color White}Uptime $alignr${uptime} ${font Arial:bold:size=08}${color White}Uptime $alignr${uptime}
#TEMP #TEMP
${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=\']" '{print($2 * 1.8)+32}'} F ${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F
${voffset -10} ${voffset -10}
${font Arial:bold:size=6}${color White}CPU${alignr}${cpu}% ${font Arial:bold:size=6}${color White}CPU${alignr}${cpu}%
${cpubar cpu} ${cpubar cpu}

Wyświetl plik

@ -61,7 +61,7 @@ ${font Arial:bold:size=14}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2}
${font Arial:bold:size=14}${color White}Frequency $alignr${freq_g cpu0}Ghz ${font Arial:bold:size=14}${color White}Frequency $alignr${freq_g cpu0}Ghz
${font Arial:bold:size=14}${color White}Uptime $alignr${uptime} ${font Arial:bold:size=14}${color White}Uptime $alignr${uptime}
#TEMP #TEMP
${font Arial:bold:size=14}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=\']" '{print($2 * 1.8)+32}'} F ${font Arial:bold:size=14}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F
${voffset -15} ${voffset -15}
${font Arial:bold:size=10}${color White}CPU${alignr}${cpu}% ${font Arial:bold:size=10}${color White}CPU${alignr}${cpu}%
${cpubar cpu} ${cpubar cpu}

Wyświetl plik

@ -57,7 +57,7 @@ ${font Arial:bold:size=10}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2}
${font Arial:bold:size=10}${color White}Frequency $alignr${freq_g cpu0}Ghz ${font Arial:bold:size=10}${color White}Frequency $alignr${freq_g cpu0}Ghz
${font Arial:bold:size=10}${color White}Uptime $alignr${uptime} ${font Arial:bold:size=10}${color White}Uptime $alignr${uptime}
#TEMP #TEMP
${font Arial:bold:size=10}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=\']" '{print($2 * 1.8)+32}'} F ${font Arial:bold:size=10}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F
${voffset -15} ${voffset -15}
${font Arial:bold:size=8}${color White}CPU${alignr}${cpu}% ${font Arial:bold:size=8}${color White}CPU${alignr}${cpu}%
${cpubar cpu} ${cpubar cpu}

Wyświetl plik

@ -58,7 +58,7 @@ ${font Arial:bold:size=08}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2}
${font Arial:bold:size=08}${color White}Frequency $alignr${freq_g cpu0}Ghz ${font Arial:bold:size=08}${color White}Frequency $alignr${freq_g cpu0}Ghz
${font Arial:bold:size=08}${color White}Uptime $alignr${uptime} ${font Arial:bold:size=08}${color White}Uptime $alignr${uptime}
#TEMP #TEMP
${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=\']" '{print($2 * 1.8)+32}'} F ${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /opt/vc/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F
${voffset -10} ${voffset -10}
${font Arial:bold:size=6}${color White}CPU${alignr}${cpu}% ${font Arial:bold:size=6}${color White}CPU${alignr}${cpu}%
${cpubar cpu} ${cpubar cpu}

Wyświetl plik

@ -40,7 +40,9 @@ PAT() {
#set locator #set locator
sed -i "s/\"locator\": \".*\",/\"locator\": \"$GRID\",/" ${FIG} sed -i "s/\"locator\": \".*\",/\"locator\": \"$GRID\",/" ${FIG}
#Change localhost to 0.0.0.0 #Change localhost to 0.0.0.0
sed -i "s/\"http_addr\": \".*\",/\"http_addr\": \"0.0.0.0:$PORT\",/" ${FIG} #This is a secutiry risk. See https://github.com/km4ack/pi-build/issues/299
#Changed to 127.0.0.1 on 11OCT2021 KM4ACK
sed -i "s/\"http_addr\": \".*\",/\"http_addr\": \"127.0.0.1:$PORT\",/" ${FIG}
jq '.ax25.rig = '\"my-rig\"'' ${HOME}/.wl2k/config.json | jq '.ardop.rig = '\"my-rig\"'' | jq '.hamlib_rigs = {'\"my-rig\"': {"address": "127.0.0.1:4532", "network": "tcp"}}' >~/Desktop/config.json jq '.ax25.rig = '\"my-rig\"'' ${HOME}/.wl2k/config.json | jq '.ardop.rig = '\"my-rig\"'' | jq '.hamlib_rigs = {'\"my-rig\"': {"address": "127.0.0.1:4532", "network": "tcp"}}' >~/Desktop/config.json
mv ${HOME}/Desktop/config.json ${FIG} mv ${HOME}/Desktop/config.json ${FIG}
sed -i 's/"enable_http": false,/"enable_http": true,/' ${FIG} sed -i 's/"enable_http": false,/"enable_http": true,/' ${FIG}
@ -252,7 +254,7 @@ CHIRP() {
cd ${DIR} || return cd ${DIR} || return
wget --tries 2 --connect-timeout=60 https://trac.chirp.danplanet.com/chirp_daily/LATEST/ wget --tries 2 --connect-timeout=60 https://trac.chirp.danplanet.com/chirp_daily/LATEST/
CHIRPBUILD=$(cat index.html | grep .tar.gz | grep chirp-daily- | awk '{ print $6 }' | sed 's/.*"//' | sed 's/>//' | sed 's/[<].*$//') CHIRPBUILD=$(cat index.html | grep .tar.gz | grep chirp-daily- | awk '{ print $6 }' | sed 's/.*"//' | sed 's/>//' | sed 's/[<].*$//')
sudo apt-get -y install python-gtk2 python-serial python-libxml2 sudo apt-get -y install python-gtk2 python-serial python-libxml2 python-suds
mkdir ${HOME}/chirp mkdir ${HOME}/chirp
cd ${HOME}/chirp || return cd ${HOME}/chirp || return
wget --tries 2 --connect-timeout=60 https://trac.chirp.danplanet.com/chirp_daily/LATEST/$CHIRPBUILD wget --tries 2 --connect-timeout=60 https://trac.chirp.danplanet.com/chirp_daily/LATEST/$CHIRPBUILD
@ -316,13 +318,14 @@ EOF
GRIDTRACKER() { GRIDTRACKER() {
cd ${HOME} || return cd ${HOME} || return
sudo apt-get install -y libgconf-2-4 sudo apt-get install -y libgconf-2-4
GRIDDLL=$(curl -s https://tagloomis.com/downloads/ | grep linux-arm32 | sed 's/^.*href="//;s/".*//')
#Line below changed 05JULY2021 to correct https://github.com/km4ack/pi-build/issues/253 #Line below changed 05JULY2021 to correct https://github.com/km4ack/pi-build/issues/253
GRIDDLL=$(curl -s https://tagloomis.com/downloads/ | grep linux-arm | sed 's/^.*href="//;s/".*//') #GRIDDLL=$(curl -s https://tagloomis.com/downloads/ | grep linux-arm | sed 's/^.*href="//;s/".*//')
wget --tries 2 --connect-timeout=60 $GRIDDLL wget --tries 2 --connect-timeout=60 $GRIDDLL
GRIDTAR=$(echo $GRIDDLL | sed 's/.*\///g') GRIDTAR=$(echo $GRIDDLL | sed 's/.*\///g')
tar -xzvf $GRIDTAR tar -xzvf $GRIDTAR
rm ./*.gz rm ./*.gz
OLDFOLDER=$(ls | grep Grid) OLDFOLDER=$(ls | grep GridTracker*-linux-arm32)
mv "$OLDFOLDER" $HOME/GridTracker mv "$OLDFOLDER" $HOME/GridTracker
cat >gridtracker.desktop <<EOF cat >gridtracker.desktop <<EOF
[Desktop Entry] [Desktop Entry]
@ -636,10 +639,18 @@ EOF
# HAMRS # HAMRS
################################## ##################################
HAMRS() { HAMRS() {
#move any existing hamrs files that might get in the way - https://github.com/km4ack/pi-build/issues/288
HAMRSCHECK=$(ls ~/Downloads/ | grep hamrs-)
if [ -n $HAMRSCHECK ]; then
echo "moving old hamrs file(s)"
mkdir -p $HOME/Downloads/old-hamrs
mv $HOME/Downloads/hamrs* $HOME/Downloads/old-hamrs
fi
cd ${HOME}/Downloads cd ${HOME}/Downloads
DL=$(curl https://www.hamrs.app | grep armv7 | sed 's/^.*href="//;s/">//') DL=$(curl https://www.hamrs.app | grep armv7 | sed 's/^.*href="//;s/">//')
wget ${DL} wget ${DL}
HAMRS=$(ls | grep hamrs) HAMRS=$(ls | grep hamrs-)
mv ${HAMRS} hamrs mv ${HAMRS} hamrs
chmod +x hamrs chmod +x hamrs
sudo mv hamrs /usr/local/bin/ sudo mv hamrs /usr/local/bin/

Wyświetl plik

@ -45,14 +45,37 @@ HSTOOLS() {
################################ ################################
GPS() { GPS() {
cd ${DIR} || return cd ${DIR} || return
wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsinstall
chmod +x ${DIR}/gpsinstall #old gpsd install left for reference
sudo ${DIR}/gpsinstall #wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsinstall
rm ${DIR}/gpsinstall #chmod +x ${DIR}/gpsinstall
#sudo ${DIR}/gpsinstall
#rm ${DIR}/gpsinstall
#begin gpsd change 11OCT2021 - see https://github.com/km4ack/pi-build/issues/316
sudo apt-get -y install scons libncurses5-dev python-dev pps-tools chrony
sudo ldconfig
cd $HOME/Downloads
wget http://download.savannah.gnu.org/releases/gpsd/gpsd-3.23.1.tar.gz
tar -xzf gpsd-3.23.1.tar.gz
rm gpsd-3.23.1.tar.gz
cd gpsd-3.23.1/
scons prefix=/usr --config=force
sudo scons udev-install
sudo ldconfig
sudo wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsd -P /etc/default/
sudo rm -rf gpsd-3.23.1/
CHRONYCHK=$(grep "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" /etc/chrony/chrony.conf)
if [ -z "$CHRONYCHK" ]; then
echo "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" | sudo tee -a /etc/chrony/chrony.conf
fi
#end gpsd change 11OCT2021
#Set GPS by serial ID #Set GPS by serial ID
#GPS Variable set by main script or update script #GPS Variable set by main script or update script and placed in config file
#and placed in config file if [ "$GPS" != 'NONE' ]; then
sudo sed -i "s|DEVICES.*$|DEVICES=\"$GPS\"|g" /etc/default/gpsd sudo sed -i "s|DEVICES.*$|DEVICES=\"$GPS\"|g" /etc/default/gpsd
fi
#add xgps to menu #add xgps to menu
cat >xgps.desktop <<EOF cat >xgps.desktop <<EOF
@ -112,6 +135,7 @@ EOF
# HAMLIB # HAMLIB
################################ ################################
HAMLIB() { HAMLIB() {
sudo apt install -y libusb-1.0 libusb-dev
cd ${DIR} || return cd ${DIR} || return
NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download |
grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] |

Wyświetl plik

@ -99,7 +99,7 @@ FLWRAP() {
################################## ##################################
FLDIGI() { FLDIGI() {
#Determine latest FLDIGI #Determine latest FLDIGI
FLTAR=$(curl -s http://www.w1hkj.com/files/fldigi/ | grep .tar.gz | sed 's/<li><a\ href="//' | sed 's/">\ fldigi.*$//') FLTAR=$(curl -s http://www.w1hkj.com/files/fldigi/ | grep .tar.gz | sed 's/.*fldigi/fldigi/;s/.gz.*$/.gz/')
FLPKG=$(echo ${FLTAR} | sed 's/.tar.gz//') FLPKG=$(echo ${FLTAR} | sed 's/.tar.gz//')
#Download latest FLDIGI tar file #Download latest FLDIGI tar file
@ -131,7 +131,7 @@ FLMSG() {
#Build FLMSG #Build FLMSG
cd ${MSGPKG} || return cd ${MSGPKG} || return
./configure --prefix=/usr/local --enable-static ./configure --prefix=/usr/local --enable-static --without-flxmlrpc
make make
sudo make install sudo make install
sudo ldconfig sudo ldconfig
@ -141,7 +141,7 @@ FLMSG() {
################################## ##################################
FLAMP() { FLAMP() {
#determine latest FLAMP #determine latest FLAMP
AMPTAR=$(curl -s http://www.w1hkj.com/files/flamp/ | grep .tar.gz | sed 's/<li><a\ href="//' | sed 's/">\ flamp.*$//') AMPTAR=$(curl -s http://www.w1hkj.com/files/flamp/ | grep .tar.gz | sed 's/<li><a\ href="//' | sed 's/">\ flamp.*$//' | tac | head -1)
AMPPKG=$(echo ${AMPTAR} | sed 's/.tar.gz//') AMPPKG=$(echo ${AMPTAR} | sed 's/.tar.gz//')
#download FLAMP #download FLAMP

Wyświetl plik

@ -123,11 +123,11 @@ RTC() {
IC2ACTIVE=$(ls /dev/*i2c*) IC2ACTIVE=$(ls /dev/*i2c*)
if [ ${IC2ACTIVE} = '/dev/i2c-1' ]; then if [ ${IC2ACTIVE} = '/dev/i2c-1' ]; then
echo "IC2 is active" echo "I2C is active"
else else
yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \ yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
--text="Please enable IC2 interface in the Raspberry Pi Configuration and try again" \ --text="Please enable I2C interface in the Raspberry Pi Configuration and try again" \
--button=gtk-close --button=gtk-close
exit 1 exit 1
fi fi
@ -361,7 +361,7 @@ his/her station.
After completing the config file, you can After completing the config file, you can
start LinBPQ from the command line by running: start LinBPQ from the command line by running:
~/linbpq/.linbpq ~/linbpq/./linbpq
Depending on your station setup, you may Depending on your station setup, you may
need to start rig control, direwolf, or need to start rig control, direwolf, or

Wyświetl plik

@ -13,6 +13,8 @@ REV=20210411
source $HOME/.config/KM4ACK source $HOME/.config/KM4ACK
sudo mkdir -p /usr/local/share/applications
FLSUITE(){ FLSUITE(){
########################## ##########################

Wyświetl plik

@ -45,7 +45,6 @@ MENU
fi fi
#verify patch has not been applied already #verify patch has not been applied already
echo "getting patchname"
PATCHNAME=$(grep PATCHNAME= $DIR/pi-build/patch/${PATCH} | sed 's/PATCHNAME=//') PATCHNAME=$(grep PATCHNAME= $DIR/pi-build/patch/${PATCH} | sed 's/PATCHNAME=//')
PATCHCHECK=$(grep ${PATCHNAME} $HOME/.config/patch) PATCHCHECK=$(grep ${PATCHNAME} $HOME/.config/patch)

Wyświetl plik

@ -6,14 +6,14 @@ Occasionally small changes (patches) are needed for the Build a Pi code. These c
# test-patch # test-patch
This patch is for testing purposes only. It will echo "This is a test patch" to the terminal. This patch is for testing purposes only. It will echo "This is a test patch" to the terminal.
# test2-patch
This patch is for testing purposes only. It will echo "This is a test patch" to the terminal.
# flmsg-20210806 # flmsg-20210806
This patch will install FLMSG 4.0.19 which as of 06AUG2021 will not compile on the Pi with the current Build a Pi code. This patch takes ~20 minutes to complete. This patch will install FLMSG 4.0.19 which as of 06AUG2021 will not compile on the Pi with the current Build a Pi code. This patch takes ~20 minutes to complete.
# hamlib4.3-20210905 # hamlib4.3-20210920
Backup your pi before installing this patch! This patch will install the latest version of libusb-1.0 and hamlib 4.3. See https://github.com/km4ack/pi-build/issues/296 This patch take ~30 minutes to complete. This patch will install hamlib 4.3 onto your Pi. This patch takes ~20 minutes to complete. https://github.com/km4ack/pi-build/issues/296
# flamp-20210912
This patch will install FLAMP. See this issue https://github.com/km4ack/pi-build/issues/301 for more details. This patch takes ~20 minutes to complete.
Last Edit 01SEPT2021 Last Edit 01SEPT2021

Wyświetl plik

@ -1,23 +1,35 @@
#!/bin/bash #!/bin/bash
#This test-patch script should serve as a #This script installs FLAMP.
#template for future patch scripts. #20210912 km4ack
#20210805 KM4ACK
#Give this patch a unique name. A good idea is #Give this patch a unique name. A good idea is
#to give it the application name that is being #to give it the application name that is being
#patched followed by the date. ie FLDIDI20210805 #patched followed by the date. ie FLDIDI20210805
PATCHNAME=test-patch20210807 PATCHNAME=flamp-20210912
PATCHFILE=$HOME/.config/patch PATCHFILE=$HOME/.config/patch
touch $PATCHFILE touch $PATCHFILE
############################### ###############################
#Patch script commands go here# #Patch script commands go here#
############################### ###############################
clear;echo;echo #determine latest FLAMP
echo "This is a test patch" AMPTAR=$(curl -s http://www.w1hkj.com/files/flamp/ | grep .tar.gz | sed 's/<li><a\ href="//' | sed 's/">\ flamp.*$//' | tac | head -1)
AMPPKG=$(echo ${AMPTAR} | sed 's/.tar.gz//')
#download FLAMP
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flamp/$AMPTAR
tar -zxvf ${AMPTAR}
#build FLAMP
cd ${AMPPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
sudo ldconfig
############################################# #############################################
#write patch name to a file so we can # #write patch name to a file so we can #

Wyświetl plik

@ -1,48 +0,0 @@
#!/bin/bash
#This script will install the latest version of hamlib-1.0
#and then install hamlib 4.3
#https://github.com/km4ack/pi-build/issues/296
#20210805 KM4ACK
#Give this patch a unique name. A good idea is
#to give it the application name that is being
#patched followed by the date. ie FLDIDI20210805
PATCHNAME=hamlib4.3-20210905
PATCHFILE=$HOME/.config/patch
touch $PATCHFILE
###############################
#Patch script commands go here#
###############################
clear;echo;echo
echo "installing libusb library"
sudo apt install libudev-dev
cd $HOME/Downloads
wget https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2
tar -xf libusb-1.0.24.tar.bz2
cd libusb-1.0.24
./configure
make
sudo make install
cd $HOME/Downloads
wget https://github.com/Hamlib/Hamlib/releases/download/4.3/hamlib-4.3.tar.gz
tar -xf hamlib-4.3.tar.gz
cd hamlib-4.3
./configure
make
sudo make install
sudo ldconfig
#############################################
#write patch name to a file so we can #
#look and see if it has been applied before.#
#This is checked by the patch-menu script #
#before running the patch #
#############################################
echo "$PATCHNAME" >> $PATCHFILE

Wyświetl plik

@ -0,0 +1,62 @@
#!/bin/bash
#This test-patch script should serve as a
#template for future patch scripts.
#20210805 KM4ACK
#Give this patch a unique name. A good idea is
#to give it the application name that is being
#patched followed by the date. ie FLDIDI20210805
PATCHNAME=hamlib4.3-20210920
PATCHFILE=$HOME/.config/patch
touch $PATCHFILE
###############################
#Patch script commands go here#
###############################
clear;echo;echo
if [ -d $HOME/Downloads/hamlib-4.3 ]; then
cd $HOME/Downloads/hamlib-4.3
sudo make uninstall
sudo make clean
sudo apt install -y libusb-1.0 libusb-dev
./configure
make
sudo make install
sudo ldconfig
else
echo "###################################"
echo "hamlib source directory not found"
echo "Downloading hamlib"
echo "###################################"
sleep 2
cd $HOME/Downloads
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}')
HAMLIBLINK=https://sourceforge.net/projects/hamlib/files/hamlib/${NEWRIG}/hamlib-${NEWRIG}.tar.gz
cd ${HOME}/Downloads || return
echo "###################################"
echo "# Installing Hamlib "
echo "###################################"
wget --tries 2 --connect-timeout=60 ${HAMLIBLINK}
tar -xzf hamlib-${NEWRIG}.tar.gz
rm hamlib-${NEWRIG}.tar.gz
cd hamlib-${NEWRIG} || return
sudo apt install -y libusb-1.0 libusb-dev
./configure
make
sudo make install
sudo ldconfig
fi
#############################################
#write patch name to a file so we can #
#look and see if it has been applied before.#
#This is checked by the patch-menu script #
#before running the patch #
#############################################
echo "$PATCHNAME" >> $PATCHFILE

2
update
Wyświetl plik

@ -22,6 +22,7 @@ CONFIG=${MYPATH}/config
LOGO=${MYPATH}/logo.png LOGO=${MYPATH}/logo.png
TEMPCRON=${MYPATH}/cron.tmp TEMPCRON=${MYPATH}/cron.tmp
VERSION=$(grep "version=" ${MYPATH}/changelog | sed 's/version=//') VERSION=$(grep "version=" ${MYPATH}/changelog | sed 's/version=//')
DATE=$(date)
FINISH() { FINISH() {
if [ -f "${BASE}" ]; then if [ -f "${BASE}" ]; then
@ -1192,6 +1193,7 @@ sudo apt -y full-upgrade
# Install Base Apps # Install Base Apps
##################################### #####################################
touch ${HOME}/.config/KM4ACK touch ${HOME}/.config/KM4ACK
echo "UPDATE=\"ran $DATE Version $VERSION\"" >> ${HOME}/.config/KM4ACK
while read i; do while read i; do
source ${FUNCTIONS}/base.function source ${FUNCTIONS}/base.function
$i $i