kopia lustrzana https://github.com/km4ack/pi-build
commit
66c9f6c9fc
|
@ -350,7 +350,7 @@ CHECK() {
|
|||
echo "YAAC=Not_Installed" >> $UPDATEFILE
|
||||
else
|
||||
|
||||
CURYAAC=$(java -jar ${HOME}/YAAC/YAAC.jar -version | grep core | awk '{print $7}' | sed 's/(.*//;s/1.0-beta//')
|
||||
CURYAAC=$(java -jar ${HOME}/YAAC/YAAC.jar -version | grep beta | sed 's/.*beta//;s/(.*//')
|
||||
wget -q https://sourceforge.net/projects/yetanotheraprsc/files/YAACBuildLabel.txt -O /run/user/${UID}/latestyaac.txt
|
||||
LATESTYAAC=$(cat /run/user/${UID}/latestyaac.txt | sed 's/1.0-beta//;s/(.*//')
|
||||
if (($(echo "${LATESTYAAC} ${CURYAAC}" | awk '{print ($1 > $2)}'))); then
|
||||
|
|
35
build-a-pi
35
build-a-pi
|
@ -57,6 +57,18 @@ EOF
|
|||
exit 0
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# Verify not run as root
|
||||
#####################################
|
||||
if [ "$WHO" = 'root' ]; then
|
||||
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="|" \
|
||||
--text="<b>ROOT DETECTED</b>\rDon't run this script as root. \
|
||||
Restart the script without sudo" \
|
||||
--button=gtk-close
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# Old OS Check
|
||||
#####################################
|
||||
|
@ -118,6 +130,9 @@ fi
|
|||
if ! hash bc >/dev/null; then
|
||||
sudo apt install -y bc
|
||||
fi
|
||||
#an issue pops up every now and again concerning xterm.
|
||||
#link lxterminal to xterm. see https://github.com/km4ack/pi-build/issues/34
|
||||
sudo ln -s /usr/bin/lxterminal /usr/bin/xterm
|
||||
|
||||
#####################################
|
||||
# Check if run before
|
||||
|
@ -545,6 +560,26 @@ EOF
|
|||
|
||||
sudo mv build-a-pi.desktop /usr/share/applications/
|
||||
|
||||
#create repair-bap tool
|
||||
cat <<EOF > /run/user/$UID/repair-bap
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f $HOME/pi-build/update ]; then
|
||||
echo "################################"
|
||||
echo "# BAP update tool not found. #"
|
||||
echo "# Repairing, please stand by #"
|
||||
echo "################################"
|
||||
cd $HOME
|
||||
git clone https://github.com/km4ack/pi-build.git || echo "Could not connect to Github. Check your internet and try again"
|
||||
echo "Repair complete. Run the Build a Pi update tool using the shortcut in the Pi menu"
|
||||
else
|
||||
clear;echo;echo
|
||||
echo "Update tool is present on the system."
|
||||
fi
|
||||
EOF
|
||||
chmod +x /run/user/$UID/repair-bap
|
||||
sudo mv /run/user/$UID/repair-bap /usr/local/bin/
|
||||
|
||||
#####################################
|
||||
# Install Base Apps
|
||||
#####################################
|
||||
|
|
10
changelog
10
changelog
|
@ -1,4 +1,12 @@
|
|||
version=3.2.0
|
||||
version=3.2.1
|
||||
|
||||
3.2.1 Fix wsjtx install - https://github.com/km4ack/pi-build/issues/365
|
||||
Fix gridtracker install - https://github.com/km4ack/pi-build/issues/362
|
||||
Fix PiQtTermTCP install - https://github.com/km4ack/pi-build/issues/360
|
||||
Add root check - https://github.com/km4ack/pi-build/issues/366
|
||||
Fix YAAC update indication - https://github.com/km4ack/pi-build/issues/363
|
||||
Create symlink lxterminal/xterm - https://github.com/km4ack/pi-build/issues/34
|
||||
Add build a pi repair tool
|
||||
|
||||
3.2.0 fix hamlib - https://github.com/km4ack/pi-build/issues/338
|
||||
fix YAAC install - https://github.com/km4ack/pi-build/issues/339
|
||||
|
|
|
@ -213,7 +213,7 @@ WSJTX() {
|
|||
|
||||
sudo apt install -y build-essential git cmake gfortran fftw3-dev qtbase5-dev qttools5-dev libqt5serialport5-dev qtmultimedia5-dev libqt5multimedia5-plugins libqt5sql5-sqlite autoconf automake libtool texinfo libusb-1.0-0-dev libudev-dev libboost-all-dev asciidoctor
|
||||
|
||||
FT8PKG=$(curl -s https://physics.princeton.edu/pulsar/k1jt/wsjtx.html | grep .tgz | sed 's/.*="//;s/">.*$//')
|
||||
FT8PKG=$(curl -s https://physics.princeton.edu/pulsar/k1jt/wsjtx.html | grep .tgz | sed 's/.*="//;s/">.*$//' | head -1)
|
||||
FT8DIR=$(echo $FT8PKG | sed 's/.tgz//')
|
||||
cd ${BUILDDIR}
|
||||
wget https://physics.princeton.edu/pulsar/k1jt/$FT8PKG
|
||||
|
@ -486,13 +486,11 @@ EOF
|
|||
GRIDTRACKER() {
|
||||
cd ${HOME} || return
|
||||
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
|
||||
#GRIDDLL=$(curl -s https://tagloomis.com/downloads/ | grep linux-arm | sed 's/^.*href="//;s/".*//')
|
||||
GRIDDLL=$(curl -s https://download.gridtracker.org/latest_release.html | grep arm32 | sed 's/.*href="//;s/">.*//')
|
||||
wget --tries 2 --connect-timeout=60 $GRIDDLL
|
||||
GRIDTAR=$(echo $GRIDDLL | sed 's/.*\///g')
|
||||
tar -xzvf $GRIDTAR
|
||||
rm ./*.gz
|
||||
rm GridTracker*.gz
|
||||
OLDFOLDER=$(ls | grep GridTracker*-linux-arm32)
|
||||
mv "$OLDFOLDER" $HOME/GridTracker
|
||||
cat >gridtracker.desktop <<EOF
|
||||
|
|
|
@ -216,6 +216,7 @@ TELNET() {
|
|||
##################################
|
||||
PITERM() {
|
||||
cd ${DIR} || return
|
||||
sudo apt install libqt5serialport5
|
||||
wget https://www.cantab.net/users/john.wiseman/Downloads/Beta/piQtTermTCP
|
||||
sudo chmod +x piQtTermTCP
|
||||
sudo mv piQtTermTCP /usr/local/bin/
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
# Description
|
||||
Occasionally small changes (patches) are needed for the Build a Pi code. These changes are usually due to a temporary or minor issue that needs to be addressed but doesn't warrent a full release of BAP. This directory holds those patches. Below you will find a description for each patch that is currently available. If a patch is currently available, the Build a Pi Update Tool will notify you and guide you through installing the patch.
|
||||
|
||||
|
||||
# Gridtracker
|
||||
This patch will install the latest version of grid tracker.
|
||||
|
||||
# test-patch
|
||||
This patch is for testing purposes only. It will echo "This is a test patch" to the terminal.
|
||||
|
||||
Last Edit 22OCT2021
|
||||
Last Edit 22DEC2021
|
||||
|
||||
PATCH=NO
|
||||
PATCH=YES
|
|
@ -0,0 +1,50 @@
|
|||
#!/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=gridtracker20211222
|
||||
|
||||
PATCHFILE=$HOME/.config/patch
|
||||
touch $PATCHFILE
|
||||
###############################
|
||||
#Patch script commands go here#
|
||||
###############################
|
||||
cd ${HOME} || return
|
||||
sudo apt-get install -y libgconf-2-4
|
||||
GRIDDLL=$(curl -s https://download.gridtracker.org/latest_release.html | grep arm32 | sed 's/.*href="//;s/">.*//')
|
||||
wget --tries 2 --connect-timeout=60 $GRIDDLL
|
||||
GRIDTAR=$(echo $GRIDDLL | sed 's/.*\///g')
|
||||
tar -xzvf $GRIDTAR
|
||||
rm GridTracker*.gz
|
||||
OLDFOLDER=$(ls | grep GridTracker*-linux-arm32)
|
||||
mv "$OLDFOLDER" $HOME/GridTracker
|
||||
cat >gridtracker.desktop <<EOF
|
||||
[Desktop Entry]
|
||||
Name=GridTracker
|
||||
Comment=GridTracker
|
||||
GenericName=GridTracker, a WSJT-X Companion
|
||||
Exec=${HOME}/GridTracker/GridTracker --disable-accelerated-2d-canvas --num-raster-threads=2
|
||||
Icon=${HOME}/GridTracker/gridtracker.png
|
||||
Path=${HOME}/GridTracker
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Terminal=false
|
||||
Categories=HamRadio;
|
||||
EOF
|
||||
|
||||
sudo mv gridtracker.desktop /usr/share/applications/
|
||||
|
||||
|
||||
#############################################
|
||||
#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
|
|
@ -1,62 +0,0 @@
|
|||
#!/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
|
24
update
24
update
|
@ -556,6 +556,30 @@ sudo apt-get -y update
|
|||
sudo apt-get -y upgrade
|
||||
sudo apt -y full-upgrade
|
||||
|
||||
#create bap repair tool if it doesn't exist
|
||||
if [ ! -f /usr/local/bin/repair-bap ]; then
|
||||
|
||||
cat <<EOF > /run/user/$UID/repair-bap
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f $HOME/pi-build/update ]; then
|
||||
echo "################################"
|
||||
echo "# BAP update tool not found. #"
|
||||
echo "# Repairing, please stand by #"
|
||||
echo "################################"
|
||||
cd $HOME
|
||||
git clone https://github.com/km4ack/pi-build.git || echo "Could not connect to Github. Check your internet and try again"
|
||||
echo "Repair complete. Run the Build a Pi update tool using the shortcut in the Pi menu"
|
||||
else
|
||||
clear;echo;echo
|
||||
echo "Update tool is present on the system."
|
||||
fi
|
||||
EOF
|
||||
chmod +x /run/user/$UID/repair-bap
|
||||
sudo mv /run/user/$UID/repair-bap /usr/local/bin/
|
||||
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# Install Base Apps
|
||||
#####################################
|
||||
|
|
Ładowanie…
Reference in New Issue