Updating GNU Radio installation case in the install script

This commit is contained in:
Sébastien Dudek 2023-02-19 16:36:35 +01:00
parent 2302bd0963
commit bf3bef50e9
1 changed files with 21 additions and 2 deletions

View File

@ -8,8 +8,27 @@ sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install -r requirements.txt
echo "[+] Installing GNU Radio dependencies"
sudo add-apt-repository ppa:gnuradio/gnuradio-releases
sudo apt-get update
installedgnuradio_version=$(dpkg -s gnuradio|egrep -i "Version: 3.10(.*)")
install_latest_gnuradio() {
sudo add-apt-repository ppa:gnuradio/gnuradio-releases
sudo apt-get update
gnuradioversion=$(sudo apt policy gnuradio|egrep -i "3.10(.*) 500"|sed 's/ //'|sed 's/ 500//')
sudo apt-get install gnuradio=$gnuradioversion # forcing GNU Radio 3.10 installation
}
if [ -z "$installedgnuradio_version" ]
then
while true; do
read -p "GNU Radio 3.10 doesn't appear to be installed, do you wish to install this program? " yn
case $yn in
[Yy]* ) install_latest_gnuradio; break;;
[Nn]* ) exit;;
* ) echo "Please answer [Y]yes or [N]no.";;
esac
done
fi
gnuradioversion=$(sudo apt policy gnuradio|egrep -i "3.10(.*) 500"|sed 's/ //'|sed 's/ 500//')
sudo apt-get install gnuradio=$gnuradioversion # forcing GNU Radio 3.10 installation