mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-02-11 01:34:15 +01:00
added python2.7 legacy support
This commit is contained in:
parent
5ebbaba6f1
commit
d5a39ff003
107
install.sh
107
install.sh
|
|
@ -51,22 +51,22 @@ didBackup=false
|
|||
# Checking for Backup
|
||||
# check for old version (for the old ones...)
|
||||
if [ -f $boswatchpath/BOSWatch/boswatch.py ]; then
|
||||
echo "Old installation found!"
|
||||
echo "A backup will be copied to $boswatchpath/old"
|
||||
echo "Old installation found!"
|
||||
echo "A backup will be copied to $boswatchpath/old"
|
||||
|
||||
mkdir /tmp/boswatch
|
||||
mv $boswatchpath/BOSWatch/* /tmp/boswatch/
|
||||
didBackup=true
|
||||
mkdir /tmp/boswatch
|
||||
mv $boswatchpath/BOSWatch/* /tmp/boswatch/
|
||||
didBackup=true
|
||||
fi
|
||||
|
||||
#and the future...
|
||||
if [ -f $boswatchpath/boswatch.py ]; then
|
||||
echo "Old installation found!"
|
||||
echo "A backup will be copied to $boswatchpath/old"
|
||||
echo "Old installation found!"
|
||||
echo "A backup will be copied to $boswatchpath/old"
|
||||
|
||||
mkdir /tmp/boswatch
|
||||
mv $boswatchpath/* /tmp/boswatch/
|
||||
didBackup=true
|
||||
mkdir /tmp/boswatch
|
||||
mv $boswatchpath/* /tmp/boswatch/
|
||||
didBackup=true
|
||||
fi
|
||||
|
||||
# Check for Flags in command line
|
||||
|
|
@ -98,101 +98,30 @@ echo ""
|
|||
|
||||
# Update of computer
|
||||
tput cup 13 15
|
||||
echo "[ 1/9] [#--------]"
|
||||
echo "[ 1/4] [#--------]"
|
||||
tput cup 15 5
|
||||
echo "-> make an apt-get update................"
|
||||
apt-get update -y > $boswatch_install_path/setup_log.txt 2>&1
|
||||
|
||||
# download software
|
||||
tput cup 13 15
|
||||
echo "[ 2/9] [##-------]"
|
||||
echo "[ 2/4] [##-------]"
|
||||
tput cup 15 5
|
||||
echo "-> download GIT and other stuff.........."
|
||||
apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake qt4-default libpulse-dev libx11-dev sox python-pip >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
apt-get -y install git cmake build-essential libusb-1.0 qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libpulse-dev libx11-dev sox python2 rtl-sdr multimon-ng>> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? download stuff
|
||||
|
||||
# download BOSWatch via git
|
||||
tput cup 13 15
|
||||
echo "[ 3/9] [###------]"
|
||||
echo "[ 3/4] [###------]"
|
||||
tput cup 15 5
|
||||
echo "-> download BOSWatch..................."
|
||||
cd $boswatchpath/
|
||||
|
||||
case $branch in
|
||||
"dev") git clone -b develop https://github.com/Schrolli91/BOSWatch . >> $boswatch_install_path/setup_log.txt 2>&1 && \
|
||||
exitcodefunction $? git-clone BOSWatch-develop ;;
|
||||
*) git clone -b master https://github.com/Schrolli91/BOSWatch . >> $boswatch_install_path/setup_log.txt 2>&1 && \
|
||||
exitcodefunction $? git-clone BOSWatch ;;
|
||||
esac
|
||||
|
||||
# Download RTL-SDR
|
||||
tput cup 13 15
|
||||
echo "[ 4/9] [####-----]"
|
||||
tput cup 15 5
|
||||
echo "-> download rtl_fm......................"
|
||||
cd $boswatch_install_path
|
||||
git clone https://github.com/Schrolli91/rtl-sdr.git >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? git-clone rtl-sdr
|
||||
cd rtl-sdr/
|
||||
|
||||
# Compie RTL-FM
|
||||
tput cup 13 15
|
||||
echo "[ 5/9] [#####----]"
|
||||
tput cup 15 5
|
||||
echo "-> compile rtl_fm......................"
|
||||
mkdir -p build && cd build
|
||||
cmake ../ -DINSTALL_UDEV_RULES=ON >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? cmake rtl-sdr
|
||||
|
||||
make >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? make rtl-sdr
|
||||
|
||||
make install >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? make-install rtl-sdr
|
||||
|
||||
ldconfig >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? ldconfig rtl-sdr
|
||||
|
||||
|
||||
# Download Multimon-NG
|
||||
tput cup 13 15
|
||||
echo "[ 6/9] [######---]"
|
||||
tput cup 15 5
|
||||
echo "-> download multimon-ng................"
|
||||
cd $boswatch_install_path
|
||||
git clone https://github.com/Schrolli91/multimon-ng.git multimonNG >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? git-clone multimonNG
|
||||
|
||||
cd $boswatch_install_path/multimonNG/
|
||||
|
||||
# Compile Multimon-NG
|
||||
tput cup 13 15
|
||||
echo "[ 7/9] [#######--]"
|
||||
tput cup 15 5
|
||||
echo "-> compile multimon-ng................."
|
||||
mkdir -p build
|
||||
cd build
|
||||
qmake ../multimon-ng.pro >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? qmake multimonNG
|
||||
|
||||
make >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? make multimonNG
|
||||
|
||||
make install >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? qmakeinstall multimonNG
|
||||
|
||||
# Download & Install MySQL-Connector for Python via pip
|
||||
tput cup 13 15
|
||||
echo "[ 8/9] [########-]"
|
||||
tput cup 15 5
|
||||
echo "-> Download & Install MySQL connector for Python."
|
||||
cd $boswatch_install_path
|
||||
pip install mysql-connector-python >> $boswatch_install_path/setup_log.txt 2>&1
|
||||
exitcodefunction $? install mysql-connector
|
||||
git clone https://github.com/Schrolli91/BOSWatch $boswatchpath
|
||||
|
||||
# Blacklist DVB-Drivers
|
||||
tput cup 13 15
|
||||
echo "[9/9] [#########]"
|
||||
echo "[4/4] [#########]"
|
||||
tput cup 15 5
|
||||
echo "-> configure..........................."
|
||||
cd $boswatchpath/
|
||||
|
|
@ -221,8 +150,8 @@ cp $boswatchpath/config/config.template.ini $boswatchpath/config/config.ini
|
|||
|
||||
#replay the backup
|
||||
if [ $didBackup = "true" ]; then
|
||||
mkdir $boswatchpath/old/
|
||||
mv /tmp/boswatch/* $boswatchpath/old/
|
||||
mkdir $boswatchpath/old/
|
||||
mv /tmp/boswatch/* $boswatchpath/old/
|
||||
fi
|
||||
|
||||
if [ $reboot = "true" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue