more fixes for os checks

This commit is contained in:
tb14
2022-10-17 23:49:41 -05:00
parent 20395cb474
commit cf438ed9ee
3 changed files with 66 additions and 132 deletions
+56 -127
View File
@@ -484,8 +484,8 @@ function maybeOS_Support() {
if (yad --image=$DIR/images/corps-icon.png --center \ if (yad --image=$DIR/images/corps-icon.png --center \
--title "Not Supported OS" \ --title "Not Supported OS" \
--text "Your OS may be compatible with this installer but has not been \ --text "Your OS may be compatible with this installer but has not been \
tested.\n\nThis installer has been tested on Raspbian Stretch, Ubuntu \ tested.\n\nThis installer has been tested on Raspberry Pi OS Buster and Bullseye \
18.04, and Mint 18.3 / 19.1.\n\nWould you like to continue anyway?" ${r} ${c}) then (32bit and 64bit), Linux Mint 20.3 and 21. It should work on most Debian 10 / 11 based distros. \n\nWould you like to continue anyway?" ${r} ${c}) then
yad --image=$DIR/images/corps-icon.png --center \ yad --image=$DIR/images/corps-icon.png --center \
--title "Not Supported OS" \ --title "Not Supported OS" \
--text "::: Did not detect perfectly supported OS but,\n\n \ --text "::: Did not detect perfectly supported OS but,\n\n \
@@ -519,9 +519,9 @@ tested.\n\nThis installer has been tested on Raspbian Stretch, Ubuntu \
fi fi
case ${PLAT} in case ${PLAT} in
Ubuntu|Raspbian|Debian|LinuxMint|PureOS|Linuxmint) Raspbian|Debian|Linuxmint)
case ${OSCN} in case ${OSCN} in
trusty|xenial|bionic|cosmic|disco|eoan|focal|jessie|stretch|buster|bullseye|sara|serena|sonya|sylvia|tara|tessa|tina|tricia|ulyana|una|vanessa|amber) buster|bullseye|una|vanessa)
;; ;;
*) *)
maybeOS_Support maybeOS_Support
@@ -640,12 +640,19 @@ fi
else else
if apt-cache show libjpeg62-turbo-dev &>/dev/null; then #if apt-cache show libjpeg62-turbo-dev &>/dev/null; then
# LIBJPG=libjpeg62-turbo-dev
# else
# LIBJPG=libjpeg9-dev
# fi
if [[ $(uname -m) = aarch64 ]]; then
LIBJPG=libjpeg62-turbo-dev LIBJPG=libjpeg62-turbo-dev
else else
LIBJPG=libjpeg9-dev LIBJPG=libjpeg9-dev
fi fi
echo "Installing / Updating FLDIGI version ${NEWFLDIGI}" echo "Installing / Updating FLDIGI version ${NEWFLDIGI}"
# sudo apt-get install -y cmake build-essential libusb-1.0-0.dev libudev-dev libltdl-dev libusb-1.0-0 libsamplerate0 libsamplerate0-dev libsigx-2.0-dev libsigc++-2.0-dev libpopt-dev tcl8.6-dev libspeex-dev libasound2-dev alsa-utils libgcrypt20-dev libpopt-dev libfltk1.3-dev libpng++-dev portaudio19-dev libpulse-dev libportaudiocpp0 libsndfile1-dev || # sudo apt-get install -y cmake build-essential libusb-1.0-0.dev libudev-dev libltdl-dev libusb-1.0-0 libsamplerate0 libsamplerate0-dev libsigx-2.0-dev libsigc++-2.0-dev libpopt-dev tcl8.6-dev libspeex-dev libasound2-dev alsa-utils libgcrypt20-dev libpopt-dev libfltk1.3-dev libpng++-dev portaudio19-dev libpulse-dev libportaudiocpp0 libsndfile1-dev ||
sudo apt-get install -y libfltk1.3-dev $LIBJPG libxft-dev libxinerama-dev libxcursor-dev libsndfile1-dev libsamplerate0-dev portaudio19-dev libpulse-dev libusb-1.0-0-dev texinfo libudev-dev || { ERRCODE="Failed to get dependencies for FLDIGI."; errors; return; } sudo apt-get install -y libfltk1.3-dev $LIBJPG libxft-dev libxinerama-dev libxcursor-dev libsndfile1-dev libsamplerate0-dev portaudio19-dev libpulse-dev libusb-1.0-0-dev texinfo libudev-dev || { ERRCODE="Failed to get dependencies for FLDIGI."; errors; return; }
@@ -658,11 +665,12 @@ fi
tar.gz && cd fldigi-${NEWFLDIGI} || tar.gz && cd fldigi-${NEWFLDIGI} ||
{ ERRCODE="Failed to extract FLDIGI"; errors; return; } { ERRCODE="Failed to extract FLDIGI"; errors; return; }
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) = x86_64 ]]; then
./configure && make && sudo make install || ./configure --enable-optimizations=native && make && sudo make install ||
{ ERRCODE="Failed to compile FLDIGI"; errors; return; } { ERRCODE="Failed to compile FLDIGI"; errors; return; }
else else
./configure --enable-optimizations=native && make && sudo make \ ./configure && make && sudo make \
install || install ||
{ ERRCODE="Failed to compile FLDIGI"; errors; return; } { ERRCODE="Failed to compile FLDIGI"; errors; return; }
fi fi
@@ -694,11 +702,11 @@ files/flmsg/flmsg-${NEWFLMSG}.tar.gz ||
&& cd flmsg-${NEWFLMSG} || && cd flmsg-${NEWFLMSG} ||
{ ERRCODE="Failed to extract FLMSG"; errors; return; } { ERRCODE="Failed to extract FLMSG"; errors; return; }
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) = x86_64 ]]; then
./configure && make && sudo make install || ./configure --enable-optimizations=native && make && sudo make install ||
{ ERRCODE="Failed to compile FLMSG"; errors; return; } { ERRCODE="Failed to compile FLMSG"; errors; return; }
else else
./configure --enable-optimizations=native && make && sudo make \ ./configure && make && sudo make \
install || install ||
{ ERRCODE="Failed to compile FLMSG"; errors; return; } { ERRCODE="Failed to compile FLMSG"; errors; return; }
fi fi
@@ -730,11 +738,11 @@ fi
rm flamp-${NEWFLAMP}.tar.gz && cd flamp-${NEWFLAMP} || rm flamp-${NEWFLAMP}.tar.gz && cd flamp-${NEWFLAMP} ||
{ ERRCODE="Failed to extract FLAMP"; errors; return; } { ERRCODE="Failed to extract FLAMP"; errors; return; }
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) = x86_64 ]]; then
./configure && make && sudo make install || ./configure --enable-optimizations=native && make && sudo make install ||
{ ERRCODE="Failed to compile FLAMP"; errors; return; } { ERRCODE="Failed to compile FLAMP"; errors; return; }
else else
./configure --enable-optimizations=native && make && sudo make \ ./configure && make && sudo make \
install || install ||
{ ERRCODE="Failed to compile FLAMP"; errors; return; } { ERRCODE="Failed to compile FLAMP"; errors; return; }
fi fi
@@ -766,11 +774,11 @@ fi
.tar.gz && cd flrig-${NEWFLRIG} || .tar.gz && cd flrig-${NEWFLRIG} ||
{ ERRCODE="Failed to extract FLRIG"; errors; return; } { ERRCODE="Failed to extract FLRIG"; errors; return; }
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) = x86_64 ]]; then
./configure && make && sudo make install || ./configure --enable-optimizations=native && make && sudo make install ||
{ ERRCODE="Failed to compile FLRIG"; errors; return; } { ERRCODE="Failed to compile FLRIG"; errors; return; }
else else
./configure --enable-optimizations=native && make && sudo make \ ./configure && make && sudo make \
install || install ||
{ ERRCODE="Failed to compile FLRIG"; errors; return; } { ERRCODE="Failed to compile FLRIG"; errors; return; }
fi fi
@@ -806,11 +814,11 @@ fi
.tar.gz && cd flwrap-${NEWFLWRAP} || .tar.gz && cd flwrap-${NEWFLWRAP} ||
{ ERRCODE="Failed to extract FLWRAP"; errors; return; } { ERRCODE="Failed to extract FLWRAP"; errors; return; }
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) = x86_64 ]]; then
./configure && make && sudo make install || ./configure --enable-optimizations=native && make && sudo make install ||
{ ERRCODE="Failed to compile FLWRAP"; errors; return; } { ERRCODE="Failed to compile FLWRAP"; errors; return; }
else else
./configure --enable-optimizations=native && make && sudo make \ ./configure && make && sudo make \
install || install ||
{ ERRCODE="Failed to compile FLWRAP"; errors; return; } { ERRCODE="Failed to compile FLWRAP"; errors; return; }
fi fi
@@ -825,79 +833,12 @@ fi
function ardop_install_old() {
ARDOPDIR=$USERDIR/ARDOP
if [[ $(uname -m) = aarch64 ]]; then
ARDOP=$"piardopc"
if [[ -f $ARDOPDIR/$ARDOP ]]; then
echo "Making backup of current version"
mv $ARDOPDIR/$ARDOP $ARDOPDIR/${ARDOP}-$(date +%h%d).bak ||
{ ERRCODE="Failed to create backup of current ardop file"; errors; return; }
fi
echo "Copying archived working $ARDOP version from "$DIR"/Files/piardopc."
#wget -P $ARDOPDIR -N http://www.cantab.net/users/john.\
#wiseman/Downloads/Beta/$ARDOP && chmod +x $ARDOPDIR/$ARDOP ||
mkdir -p $ARDOPDIR && cp $DIR/Files/piardopc $ARDOPDIR/$ARDOP && chmod +x $ARDOPDIR/$ARDOP ||
{ ERRCODE="Failed to download ardop"; errors; return; }
else
ARDOP=$"ardopc"
if [[ -f $ARDOPDIR/$ARDOP ]]; then
echo "Making backup of current version"
mv $ARDOPDIR/$ARDOP $ARDOPDIR/${ARDOP}-$(date +%h%d).bak ||
{ ERRCODE="Failed to create backup of current ardop file"; errors; return; }
fi
sudo apt-get -y install libasound2-dev ||
{ ERRCODE="Failed to get dependencies for ARDOPC"; errors; return; }
echo "Downloading current $ARDOP version."
wget -P $ARDOPDIR -N http://www.cantab.net/users/john.\
wiseman/Downloads/Beta/TeensyProjects.zip && unzip -d $ARDOPDIR/ $ARDOPDIR/TeensyProjects.zip && rm $ARDOPDIR/TeensyProjects.zip ||
{ ERRCODE="Failed to download and extract ardop source"; errors; return; }
cd $ARDOPDIR/TeensyProjects/ARDOPC/ && make ||
{ ERRCODE="Failed to compile ardop source code"; errors; return; }
mv $ARDOPDIR/TeensyProjects/ARDOPC/ardopc $USERDIR/ARDOP/ ||
{ ERRCODE="Failed to move ardopc to $ARDOPDIR"; errors; return; }
rm -r $ARDOPDIR/TeensyProjects/ ||
{ ERRCODE="Failed to remove source code directory"; errors; return; }
fi
if [[ ! -f $HOME/.asoundrc ]]; then
echo "pcm.ARDOP {
type rate
slave {
pcm "\""hw:1,0"\""
rate 48000
}
}" > $HOME/.asoundrc ||
{ ERRCODE="Failed to create .asoundrc configuration file"; errors; return; }
fi
echo ardop >> /tmp/cleanup
echo asoundrc >> /tmp/cleanup
if ! hash ardop-status 2>/dev/null; then
ardop_launcher
fi
}
function ardop_install() { function ardop_install() {
ARDOPDIR=$USERDIR/ARDOP ARDOPDIR=$USERDIR/ARDOP
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) =~ (armv7l|aarch64) ]]; then
ARDOP=$"piardopc" ARDOP=$"piardopc"
if [[ -f $ARDOPDIR/$ARDOP ]]; then if [[ -f $ARDOPDIR/$ARDOP ]]; then
@@ -959,7 +900,7 @@ function ardop_gui_install() {
ARDOPDIR=$USERDIR/ARDOP ARDOPDIR=$USERDIR/ARDOP
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) =~ (armv7l|aarch64) ]]; then
ARDOPGUI=$"piARDOP_GUI" ARDOPGUI=$"piARDOP_GUI"
if [[ -f $ARDOPDIR/$ARDOPGUI ]]; then if [[ -f $ARDOPDIR/$ARDOPGUI ]]; then
@@ -1007,7 +948,7 @@ fi
function ardop_launcher() { function ardop_launcher() {
if [[ $(uname -m) = aarch64 ]]; then if [[ $(uname -m) =~ (armv7l|aarch64) ]]; then
local var1="piardopc" local var1="piardopc"
local var13="piARDOP_GUI" local var13="piARDOP_GUI"
else else
@@ -1210,10 +1151,10 @@ if [[ $NEWPAT == "SERVER DOWN" ]]; then
echo "PAT server unresponsive or broken link." >> /tmp/failures echo "PAT server unresponsive or broken link." >> /tmp/failures
return return
fi fi
if [[ $(uname -m) = aarch64 ]] && [[ $(getconf LONG_BIT) = '32' ]]; then if [[ $(uname -m) = armv7l ]]; then
SYS=$"armhf" SYS=$"armhf"
elif [[ $(uname -m) = aarch64 ]] && [[ $(getconf LONG_BIT) = '64' ]]; then elif [[ $(uname -m) = aarch64 ]]; then
SYS=$"arm64" SYS=$"arm64"
elif [[ $(uname -m) = x86_64 ]]; then elif [[ $(uname -m) = x86_64 ]]; then
@@ -1514,14 +1455,25 @@ function ublox_gps_setup() {
#Deps from Debian 10 #Deps from Debian 10
#sudo apt-get -y install gpsd gpsd-clients python-gps chrony || #sudo apt-get -y install gpsd gpsd-clients python-gps chrony ||
if apt-cache show gpsd-tools &>/dev/null; then #if apt-cache show gpsd-tools &>/dev/null; then
GPSDEP=gpsd-tools # GPSDEP=gpsd-tools
else #else
GPSDEP=python-gps # GPSDEP=python-gps
fi #fi
sudo apt install -y gpsd gpsd-clients $GPSDEP chrony || #Bullseye and Mint 21
if [[ $OSCN =~ (bullseye|vanessa) ]]; then
sudo apt install -y gpsd gpsd-clients chrony gpsd-tools
#Buster
elif [[ $OSCN = buster ]]; then
sudo apt install -y gpsd gpsd-clients chrony python-gps
#Mint 20.3
elif [[ $OSCN = una ]]; then
sudo apt install -y gpsd gpsd-clients chrony ||
{ ERRCODE="Failed to install gpsd related packages"; errors; return; } { ERRCODE="Failed to install gpsd related packages"; errors; return; }
fi
if [[ -f /etc/default/gpsd ]]; then if [[ -f /etc/default/gpsd ]]; then
@@ -2224,12 +2176,12 @@ case $CONKYSEL in
cat >> $HOME/.conkyrc <<\EOF cat >> $HOME/.conkyrc <<\EOF
conky.text = [[ conky.text = [[
${color1}${font Roboto Mono:style=Bold:pixelsize=22}\ ${color1}${font Roboto Mono:style=Bold:pixelsize=22}\
Pacific:${goto 175}Eastern:${alignr}Zulu: Central:${goto 175}Eastern:${alignr}Zulu:
$color $hr $color $hr
${color grey}${font Roboto:pixelsize=22}${tztime America/Los_Angeles %H:%M:%S}\ ${color grey}${font Roboto:pixelsize=22}${tztime America/Chicago %H:%M:%S}\
${goto 175}${tztime America/New_York %H:%M:%S}\ ${goto 175}${tztime America/New_York %H:%M:%S}\
${alignr}${tztime Zulu %H:%M:%S} ${alignr}${tztime Zulu %H:%M:%S}
${font Roboto:pixelsize=12}${tztime America/Los_Angeles %A %m-%d-%y}\ ${font Roboto:pixelsize=12}${tztime America/Chicago %A %m-%d-%y}\
${goto 175}${tztime America/New_York %A %m-%d-%y}\ ${goto 175}${tztime America/New_York %A %m-%d-%y}\
${alignr}${tztime Zulu %A %m-%d-%y} ${alignr}${tztime Zulu %A %m-%d-%y}
@@ -2319,12 +2271,12 @@ EOF
cat >> $HOME/.conkyrc <<\EOF cat >> $HOME/.conkyrc <<\EOF
conky.text = [[ conky.text = [[
${color1}${font Roboto Mono:style=Bold:pixelsize=14}\ ${color1}${font Roboto Mono:style=Bold:pixelsize=14}\
Pacific:${goto 135}Eastern:${alignr}Zulu: Central:${goto 135}Eastern:${alignr}Zulu:
$color $hr $color $hr
${color grey}${font Roboto:pixelsize=12}${tztime America/Los_Angeles %H:%M:%S}\ ${color grey}${font Roboto:pixelsize=12}${tztime America/Chicago %H:%M:%S}\
${goto 135}${tztime America/New_York %H:%M:%S}\ ${goto 135}${tztime America/New_York %H:%M:%S}\
${alignr}${tztime Zulu %H:%M:%S} ${alignr}${tztime Zulu %H:%M:%S}
${font Roboto:pixelsize=12}${tztime America/Los_Angeles %m-%d-%y}\ ${font Roboto:pixelsize=12}${tztime America/Chicago %m-%d-%y}\
${goto 135}${tztime America/New_York %m-%d-%y}\ ${goto 135}${tztime America/New_York %m-%d-%y}\
${alignr}${tztime Zulu %m-%d-%y} ${alignr}${tztime Zulu %m-%d-%y}
@@ -2674,29 +2626,6 @@ fi
function bitmessage_install_old() {
if hash pybitmessage 2>/dev/null; then
cd $SECDIR/PyBitmessage/src && git fetch --all && git reset --hard \
origin/master ||
{ ERRCODE="Failed to update Bitmessage"; errors; return; }
else
sudo apt-get install -y python openssl libssl-dev python-msgpack python-qt4 \
python-setuptools python-pyopencl g++ ||
{ ERRCODE="Failed to get dependencies for Bitmessage"; errors; return; }
cd $SECDIR/ && git clone https://github.com/Bitmessage/PyBitmessage ||
{ ERRCODE="Failed to download Bitmessage"; errors; return; }
cd $SECDIR/PyBitmessage && sudo python setup.py install ||
{ ERRCODE="Failed to install Bitmessage"; errors; return; }
fi
echo pybitmessagesetup >> /tmp/cleanup
}
function bitmessage_install() { function bitmessage_install() {
if apt-cache show python-qt4 &>/dev/null; then if apt-cache show python-qt4 &>/dev/null; then
+5
View File
@@ -1,3 +1,8 @@
# Version 0.7.3
- More clean up for os detection and dependencies
- Removed stated support for old operating systems. Stated support for Buster, Bullseye(32/64bit), Mint 20.3/21.
# Version 0.7.2 # Version 0.7.2
- FLDIGI raspbian 64bit check - FLDIGI raspbian 64bit check
- Fix 64bit check for diff OS based upon apt avaibility. - Fix 64bit check for diff OS based upon apt avaibility.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 111 KiB