Better error handling for cd

pull/236/head
Hugh 2021-03-17 10:36:15 -04:00
rodzic 5c21b2bbaa
commit 633e30248c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 47398A08D38CF50B
8 zmienionych plików z 87 dodań i 87 usunięć

Wyświetl plik

@ -446,7 +446,7 @@ pcmanfm --set-wallpaper /usr/share/rpd-wallpaper/bap-wallpaper.jpg
mkdir -p ${DIR} 2>/dev/null
#add virtual sound card link for pulse audio
cd ${DIR} || exit
cd ${DIR} || ! echo "Failure"
cat >tempsound <<EOF
pcm.pulse {
type pulse
@ -460,7 +460,7 @@ sudo mv tempsound /etc/asound.conf
#mod sound card for Buster May 2020
#so it will always load as card #2
cd ${DIR} || exit
cd ${DIR} || ! echo "Failure"
cat >tempsound <<EOF
#Internal sound
options snd-bcm2835 index=0
@ -482,7 +482,7 @@ echo "export PATH=$PATH:${HOME}/bin" >>${HOME}/.bashrc
chmod +x ${MYPATH}/update ${MYPATH}/build-a-pi
#create build-a-pi menu item
cd ${MYPATH} || exit
cd ${MYPATH} || ! echo "Failure"
cat >build-a-pi.desktop <<EOF
[Desktop Entry]
Name=Build-a-Pi

Wyświetl plik

@ -146,7 +146,7 @@ CHECK() {
if [ ! -d ${HOME}/patmenu2 ]; then
PATMENU="Not_Installed"
else
cd ${HOME}/patmenu2/ || exit
cd ${HOME}/patmenu2/ || ! echo "Failure"
wget -O ${HOME}/patmenu2/latest https://raw.githubusercontent.com/km4ack/patmenu2/master/changelog >/dev/null 2>&1
LATEST=$(cat ${HOME}/patmenu2/latest | grep '^release' | sed 's/release=//')
CURRENT=$(cat ${HOME}/patmenu2/changelog | grep '^release' | sed 's/release=//')
@ -303,7 +303,7 @@ echo "DIREWOLF $DIRE" >>${DIR}/apps.info
echo "Pat Menu $PATMENU" >>${DIR}/apps.info
echo "EES $EES" >>${DIR}/apps.info
cd ${HOME}/Desktop || exit
cd ${HOME}/Desktop || ! echo "Failure"
zip -r ${CALL}-diagnostic.zip ${DIR} >/dev/null 2>&1
rm -rf ${DIR} >/dev/null 2>&1

Wyświetl plik

@ -177,7 +177,7 @@ EOF
# M0IAX Tools
##################################
M0IAX() {
cd ${DIR} || exit
cd ${DIR} || return
wget http://m0iax.com/wp-content/uploads/2020/08/JS8CallUtils_RaspberryPi.zip
unzip JS8CallUtils_RaspberryPi.zip
rm JS8CallUtils_RaspberryPi.zip
@ -249,16 +249,16 @@ EOF
# CHIRP
##################################
CHIRP() {
cd ${DIR} || exit
cd ${DIR} || return
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/[<].*$//')
sudo apt-get -y install python-gtk2 python-serial python-libxml2
mkdir ${HOME}/chirp
cd ${HOME}/chirp || exit
cd ${HOME}/chirp || return
wget --tries 2 --connect-timeout=60 https://trac.chirp.danplanet.com/chirp_daily/LATEST/$CHIRPBUILD
tar -xzf $CHIRPBUILD
CHIRPDIR=$(echo $CHIRPBUILD | sed 's/[.].*$//')
cd $CHIRPDIR || exit
cd $CHIRPDIR || return
sudo python setup.py install
pip install future
}
@ -268,11 +268,11 @@ CHIRP() {
##################################
GARIM() {
GPKG=$(curl -s https://www.whitemesa.net/garim/src/ | grep tar.gz | tail -1 | sed 's/^.*garim/garim/' | sed 's/tar.gz.*$/tar.gz/')
cd ${DIR} || exit
cd ${DIR} || return
wget --tries 2 --connect-timeout=60 https://www.whitemesa.net/garim/src/$GPKG
tar -xzvf $GPKG
DIRR=$(echo $GPKG | sed 's/.tar.gz//')
cd ${DIRR} || exit
cd ${DIRR} || return
./configure
make
sudo make install
@ -284,14 +284,14 @@ GARIM() {
QSSTV() {
sudo apt-get install -y g++ libfftw3-dev qt5-default libpulse-dev libhamlib-dev libasound2-dev libv4l-dev libopenjp2-7 libopenjp2-7-dev
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
#not working with 9.5.1
#TAR=$(curl -s http://users.telenet.be/on4qz/qsstv/downloads/ | grep tar.gz | sed 's/.*href="//' | sed 's/">.*$//' | tail -1)
#wget --tries 2 --connect-timeout=60 http://users.telenet.be/on4qz/qsstv/downloads/$TAR
#SSTVTAR=$(echo $TAR | sed 's/.tar.gz//;s/.0//')
#tar -xvzf $TAR
#cd $SSTVTAR || exit
#cd $SSTVTAR || return
#qmake
#make
#sudo make install
@ -299,7 +299,7 @@ QSSTV() {
#hard code for 9.4.4 as temp wrokaround 02MARCH2021
wget --tries 2 --connect-timeout=60 http://users.telenet.be/on4qz/qsstv/downloads/qsstv_9.4.4.tar.gz
tar -xvzf qsstv_9.4.4.tar.gz
cd qsstv_9.4.4 || exit
cd qsstv_9.4.4 || return
qmake
make
sudo make install
@ -311,7 +311,7 @@ QSSTV() {
# GRIDTRACKER
##################################
GRIDTRACKER() {
cd ${HOME} || exit
cd ${HOME} || return
sudo apt-get install -y libgconf-2-4
GRIDDLL=$(curl -s https://tagloomis.com/downloads/ | grep Arm | head -1 | sed 's/.*href="//' | sed 's/.gz.*$/.gz/')
wget --tries 2 --connect-timeout=60 $GRIDDLL
@ -342,10 +342,10 @@ PROPAGATION() {
sudo apt-get install -y gfortran yelp python3-gi python3-gi-cairo rarian-compat gnome-doc-utils pkg-config python3-dateutil python3-mpltoolkits.basemap python3-cairocffi libgtk-3-dev
#install primary program
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 https://www.qsl.net/hz1jw/voacapl/downloads/voacapl-0.7.2.tar.gz
tar -xzf voacapl-0.7.2.tar.gz
cd voacapl-0.7.2 || exit
cd voacapl-0.7.2 || return
./configure
make
sudo make install
@ -364,12 +364,12 @@ PROPAGATION() {
# YAAC
##################################
YAAC() {
cd ${DIR} || exit
cd ${DIR} || return
#wget --tries 2 --connect-timeout=60 https://sourceforge.net/projects/yetanotheraprsc/files/YAAC.zip/
wget --tries 2 --connect-timeout=60 https://www.ka2ddo.org/ka2ddo/YAAC.zip
sudo apt-get install -y openjdk-8-jre librxtx-java
mkdir -p ${HOME}/YAAC
cd ${HOME}/YAAC || exit
cd ${HOME}/YAAC || return
touch YAAC
echo "#!/bin/bash" >>YAAC
echo "java -jar ${HOME}/YAAC/YAAC.jar" >>YAAC
@ -403,16 +403,16 @@ XASTIR() {
gv libcurl4-openssl-dev shapelib libshp-dev libpcre3-dev libproj-dev libdb-dev python-dev \
libax25-dev libwebp-dev libwebp-dev libgraphicsmagick1-dev festival festival-dev
cd || exit
cd || return
git clone https://github.com/Xastir/Xastir.git
cd Xastir || exit
cd Xastir || return
./bootstrap.sh
mkdir build
cd build || exit
cd build || return
../configure
make
sudo make install
cd || exit
cd || return
rm -rf Xastir
cat >xastir.desktop <<EOF
@ -449,19 +449,19 @@ EES() {
sudo apt-get install -y ghostwriter
fi
#Install the KM4ACK EES
cd ${DIR} || exit
cd ${DIR} || return
git clone https://github.com/km4ack/EES-LITE.git
cd ${DIR}/EES-LITE || exit
cd ${DIR}/EES-LITE || return
#git dev branch of code
git checkout dev
sudo cp -r ${DIR}/EES-LITE/* /var/www/html/
rm -rf "${DIR}/EES-LITE"
cd /var/www/html || exit
cd /var/www/html || return
sudo chmod +x /var/www/html/firstrun
sudo /var/www/html/./firstrun
sudo sed -i "s/N0CALL/${CALL}/" /var/www/html/config.php
sudo sed -i 's/REMINDER\ FOR\ OPERATOR\ TO\ DO\ SOMETHING/ENABLE\ AUTO\ POST\ REPLY\ IN\ CRON/' /var/www/html/config.php
cd ${DIR} || exit
cd ${DIR} || return
#Change Pat Winlink port so it won't interfer with the EES
sed -i 's/0.0.0.0:8080/0.0.0.0:5000/' ${HOME}/.wl2k/config.json
sed -i 's/PORT=8080/PORT=5000/' ${HOME}/patmenu2/config
@ -498,7 +498,7 @@ EES() {
# Pi-APRS
##################################
PI-APRS() {
cd ${HOME} || exit
cd ${HOME} || return
git clone https://github.com/km4ack/Pi-APRS.git
sudo cp ~/Pi-APRS/piaprs.desktop /usr/share/applications
@ -509,11 +509,11 @@ PI-APRS() {
##################################
SMALL() {
sudo apt-get -y install make g++ libx11-dev
cd ${DIR} || exit
cd ${DIR} || return
curl -o ESPHamClock.zip http://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip
unzip ESPHamClock.zip
rm ESPHamClock.zip
cd ESPHamClock || exit
cd ESPHamClock || return
sudo make -j 4 hamclock
sudo chmod +s hamclock
sudo mv hamclock /usr/local/bin/hamclock
@ -539,11 +539,11 @@ EOF
##################################
LARGE() {
sudo apt-get -y install make g++ libx11-dev
cd ${DIR} || exit
cd ${DIR} || return
curl -o ESPHamClock.zip http://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip
unzip ESPHamClock.zip
rm ESPHamClock.zip
cd ESPHamClock || exit
cd ESPHamClock || return
sudo make -j 4 hamclock-1600x960
sudo chmod +s hamclock-1600x960
sudo mv hamclock-1600x960 /usr/local/bin/hamclock
@ -577,12 +577,12 @@ GPREDICT() {
##################################
TQSL() {
sudo apt install -y cmake g++ libexpat1-dev libssl-dev libdb++-dev libcurl4-openssl-dev libwxgtk3.0-dev
cd ${HOME} || exit
cd ${HOME} || return
CUR=$(curl -s http://www.arrl.org/tqsl-download | grep "for Linux" | sed 's/.*TQSL //' | awk '{print $1}')
wget http://www.arrl.org/tqsl/tqsl-${CUR}.tar.gz
tar -xzvf tqsl-${CUR}.tar.gz
rm "tqsl-${CUR}.tar.gz"
cd tqsl-${CUR} || exit
cd tqsl-${CUR} || return
cmake .
make
sudo make install
@ -610,17 +610,17 @@ EOF
DIRXLOG=$(echo ${TARXLOG} | sed 's/.tar.gz//')
cd ${HOME} || exit
cd ${HOME} || return
sudo apt-get install -y libgtkgl2.0-dev libusb-1.0-0-dev
wget https://download.savannah.nongnu.org/releases/xlog/${TARXLOG}
tar -xzvf ${TARXLOG}
rm ${TARXLOG}
cd ${DIR}XLOG || exit
cd ${DIR}XLOG || return
./configure
make
sudo make install
cd ${HOME} || exit
cd ${HOME} || return
rm -rf "${DIR}XLOG"
fi
}

Wyświetl plik

@ -31,7 +31,7 @@ systemctl disable hostapd
systemctl disable dnsmasq
mkdir -p ${HOME}/temp
cd ${HOME}/temp || exit
cd ${HOME}/temp || return
wget http://www.raspberryconnect.com/images/Autohotspot/autohotspot-95-4/hostapd.txt
@ -67,7 +67,7 @@ echo "nohook wpa_supplicant" >>/etc/dhcpcd.conf
#setup ip forward
sed 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf
cd ${HOME}/temp || exit
cd ${HOME}/temp || return
wget http://www.raspberryconnect.com/images/autohotspotN/autohotspotn-95-4/autohotspot-service.txt
@ -85,7 +85,7 @@ if [ -z "iw" ]; then #THIS MIGHT NEED TO SOME LOOKING AT -- SEE SC2157
fi
#install autohotspot script
cd ${HOME}/temp || exit
cd ${HOME}/temp || return
wget http://www.raspberryconnect.com/images/autohotspotN/autohotspotn-95-4/autohotspotN.txt
#mod ip address for our custom setup
sed -i 's/192.168.50.5/10.10.10.10/' autohotspotN.txt

Wyświetl plik

@ -44,7 +44,7 @@ HSTOOLS() {
# GPS
################################
GPS() {
cd ${DIR} || exit
cd ${DIR} || return
wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsinstall
chmod +x ${DIR}/gpsinstall
sudo ${DIR}/gpsinstall
@ -75,7 +75,7 @@ EOF
################################
ARDOP() {
mkdir -p ${HOME}/ardop
cd ${HOME}/ardop || exit
cd ${HOME}/ardop || return
wget --tries 2 --connect-timeout=60 https://www.cantab.net/users/john.wiseman/Downloads/Beta/piardopc
sudo chmod +x ${HOME}/ardop/piardopc
}
@ -85,7 +85,7 @@ ARDOP() {
################################
ARDOPGUI() {
mkdir -p ${HOME}/ardop
cd ${HOME}/ardop || exit
cd ${HOME}/ardop || return
wget --tries 2 --connect-timeout=60 https://www.cantab.net/users/john.wiseman/Downloads/Beta/piARDOP_GUI
sudo chmod +x ${HOME}/ardop/piARDOP_GUI
cat >ardopgui.desktop <<EOF
@ -112,12 +112,12 @@ EOF
# HAMLIB
################################
HAMLIB() {
cd ${DIR} || exit
cd ${DIR} || return
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 || exit
cd ${HOME}/Downloads || return
echo "###################################"
echo "# Installing Hamlib "
echo "###################################"
@ -125,7 +125,7 @@ HAMLIB() {
tar -xzf hamlib-${NEWRIG}.tar.gz
rm hamlib-${NEWRIG}.tar.gz
cd hamlib-${NEWRIG} || exit
cd hamlib-${NEWRIG} || return
./configure
make
sudo make install
@ -136,10 +136,10 @@ HAMLIB() {
# DIREWOLF
################################
DIREWOLF() {
cd ${HOME} || exit
cd ${HOME} || return
git clone https://www.github.com/wb2osz/direwolf
cd ${HOME}/direwolf || exit
(mkdir build && cd build) || exit
cd ${HOME}/direwolf || return
(mkdir build && cd build) || return
sudo apt-get install -y libasound2-dev cmake
cmake ..
make -j 4

Wyświetl plik

@ -35,13 +35,13 @@ FLSTART() {
#determine latest FLXMLRPC & download
FLXM=$(curl -s http://www.w1hkj.com/files/flxmlrpc/ | grep .tar.gz | sed 's/<li><a\ href="//' | sed 's/">\ flxmlrpc.*$//')
XMPKG=$(echo ${FLXM} | sed 's/.tar.gz//')
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flxmlrpc/${FLXM}
tar -zxvf ${FLXM}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#build FLXMLRPC
cd ${XMPKG} || exit
cd ${XMPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
@ -58,13 +58,13 @@ FLRIG() {
RIGPKG=$(echo ${RIGTAR} | sed 's/.tar.gz//')
#Download latest FLRIG
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flrig/${RIGTAR}
tar -zxvf ${RIGTAR}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#Build FLRIG
cd ${RIGPKG} || exit
cd ${RIGPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
@ -80,13 +80,13 @@ FLWRAP() {
WRAPPKG=$(echo ${WRAPTAR} | sed 's/.tar.gz//')
#Download latest FLWRAP
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flwrap/${WRAPTAR}
tar -zxvf ${WRAPTAR}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#Build FLRIG
cd ${WRAPPKG} || exit
cd ${WRAPPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
@ -102,13 +102,13 @@ FLDIGI() {
FLPKG=$(echo ${FLTAR} | sed 's/.tar.gz//')
#Download latest FLDIGI tar file
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/fldigi/${FLTAR}
tar -zxvf ${FLTAR}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#build FLDIGI
cd ${FLPKG} || exit
cd ${FLPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
@ -123,13 +123,13 @@ FLMSG() {
MSGPKG=$(echo ${MSGTAR} | sed 's/.tar.gz//')
#download FLMSG
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flmsg/${MSGTAR}
tar -zxvf ${MSGTAR}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#Build FLMSG
cd ${MSGPKG} || exit
cd ${MSGPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
@ -144,13 +144,13 @@ FLAMP() {
AMPPKG=$(echo ${AMPTAR} | sed 's/.tar.gz//')
#download FLAMP
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flamp/$AMPTAR
tar -zxvf ${AMPTAR}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#build FLAMP
cd ${AMPPKG} || exit
cd ${AMPPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install
@ -165,13 +165,13 @@ FLNET() {
NETPKG=$(echo ${NETTAR} | sed 's/.tar.gz//')
#download FLNET
cd ${HOME}/Downloads || exit
cd ${HOME}/Downloads || return
wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flnet/$NETTAR
tar -zxvf ${NETTAR}
rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035
#build FLNET
cd ${NETPKG} || exit
cd ${NETPKG} || return
./configure --prefix=/usr/local --enable-static
make
sudo make install

Wyświetl plik

@ -2,7 +2,7 @@
# DIPOLE CALC
##################################
DIPOLE() {
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/dipole
chmod +x dipole
@ -26,7 +26,7 @@ EOF
# Call Lookup
##################################
CALLSIGN() {
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/getcall
chmod +x getcall
@ -52,7 +52,7 @@ TEMPCONVERT() {
if ! hash bc 2>/dev/null; then
sudo apt-get install -y bc
fi
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/converttemp
chmod +x converttemp
@ -83,7 +83,7 @@ GPARTED() {
##################################
SHOWLOG() {
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/showlog
chmod +x showlog
@ -185,18 +185,18 @@ by connecting to the internet or attaching a GPS" \
# PISTATS
##################################
PISTATS() {
cd ${HOME} || exit
cd ${HOME} || return
CUR=$(curl -s http://www.w1hkj.com/pi3/ | grep .tgz | sed 's/.*pistats//' | sed 's/<\/a><br>//')
wget http://www.w1hkj.com/pi3/pistats${CUR}
tar -xzvf pistats${CUR}
rm pistats${CUR}
PISTATDIR=$(ls ${HOME} | grep pistats)
cd ${PISTATDIR} || exit
cd ${PISTATDIR} || return
sudo apt-get install -y libfltk1.3-dev
make
sudo mv pistats /usr/local/bin
sudo mv ${HOME}/${PISTATDIR}/data/pistats.desktop /usr/share/applications/
cd ${HOME} || exit
cd ${HOME} || return
rm -rf "${PISTATDIR}"
}
@ -211,7 +211,7 @@ TELNET() {
# PiQtTermTCP
##################################
PITERM() {
cd ${DIR} || exit
cd ${DIR} || return
wget https://www.cantab.net/users/john.wiseman/Downloads/Beta/piQtTermTCP
sudo chmod +x piQtTermTCP
sudo mv piQtTermTCP /usr/local/bin/
@ -236,7 +236,7 @@ EOF
# Security Tools
##################################
SECURITY() {
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/security-tools
bash security-tools
@ -261,7 +261,7 @@ EOF
# YGATE
##################################
YGATE() {
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget https://raw.githubusercontent.com/craigerl/ygate/master/ygate.py
chmod +x ygate.py
@ -284,9 +284,9 @@ EOF
# BPQ
##################################
BPQ() {
source ${HOME}/pi-build/config || exit
source ${HOME}/pi-build/config || return
#install LinBPQ
cd || exit
cd || return
##########################################################################
#commands below this line were taken from John Wiseman's install script.
#and modded to pull the operators call sign from the BAP config file.
@ -297,7 +297,7 @@ BPQ() {
echo "Downloading ${LINBPQ} and ${APRS} to linbpq and bpqaprs"
mkdir linbpq
cd linbpq || exit
cd linbpq || return
wget -nv http://www.cantab.net/users/john.wiseman/Downloads/Beta/${LINBPQ} -O linbpq
chmod +x linbpq
wget -nv http://www.cantab.net/users/john.wiseman/Downloads/Beta/${APRS} -O bpqaprs
@ -310,11 +310,11 @@ BPQ() {
echo "Downloading HTML Files"
mkdir HTML
cd HTML || exit
cd HTML || return
wget -nv http://www.cantab.net/users/john.wiseman/Downloads/Beta/HTMLPages.zip
unzip -o -q HTMLPages.zip
rm HTMLPages.zip
cd .. || exit
cd .. || return
wget -nv http://www.cantab.net/users/john.wiseman/Downloads/LinBPQAPRS.zip
unzip -o -q LinBPQAPRS.zip
rm LinBPQAPRS.zip
@ -330,7 +330,7 @@ BPQ() {
#End John Wiseman install script
#####################################################
#install BPQ config generator
cd ${HOME}/linbpq || exit
cd ${HOME}/linbpq || return
wget https://www.cantab.net/users/john.wiseman/Downloads/Beta/piBPQConfigGen
chmod +x piBPQConfigGen
@ -380,7 +380,7 @@ EOF
# Battery Test Script
##################################
BATT() {
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/batt-test
chmod +x batt-test
@ -403,7 +403,7 @@ EOF
# VNC Viewer
##################################
VNC() {
cd ${HOME} || exit
cd ${HOME} || return
PACKAGE=$(curl -s https://www.realvnc.com/en/connect/download/viewer/raspberrypi/ | grep .deb | awk '{print $2}' |
sed 's/href="\/download\/file\/viewer.files\///' | sed 's/"//')
@ -429,7 +429,7 @@ GPSUPDATE() {
rm ${HOME}/bin/gpsupdate
fi
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsupdate
chmod +x gpsupdate
@ -453,7 +453,7 @@ EOF
REMOVEMS() {
#download the file
cd ${HOME}/bin || exit
cd ${HOME}/bin || return
wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/removeMS
chmod +x ${HOME}/bin/removeMS
#place user directions on desktop

8
update
Wyświetl plik

@ -47,7 +47,7 @@ trap FINISH EXIT
#fix issue 108 https://github.com/km4ack/pi-build/issues/108
#Thanks to N5RKS for finding the bug
if [ -d ${HOME}/pi-build/temp ]; then
rm -rf ${HOME}/pi-build/temp
rm -rf "${HOME}/pi-build/temp"
fi
#####################################
@ -91,8 +91,8 @@ EOF
fi
echo "Updating Build a Pi to $LATEST"
mv ${MYPATH}/config ${HOME}/Documents/config.bap
rm -rf ${MYPATH}
cd ~ || exit
rm -rf "${MYPATH}"
cd ~ || ! echo "Failure"
git clone https://github.com/km4ack/pi-build.git
mv ${HOME}/Documents/config.bap ${MYPATH}/config
@ -400,7 +400,7 @@ CHECK() {
if [ ! -d ${HOME}/patmenu2 ]; then
PATMENU="Not_Installed"
else
cd ${HOME}/patmenu2/ || exit
cd ${HOME}/patmenu2/ || ! echo "Failure"
wget -O ${HOME}/patmenu2/latest https://raw.githubusercontent.com/km4ack/patmenu2/master/changelog >/dev/null 2>&1
LATEST=$(cat ${HOME}/patmenu2/latest | grep '^release' | sed 's/release=//')
CURRENT=$(cat ${HOME}/patmenu2/changelog | grep '^release' | sed 's/release=//')