[fix] The install should be more streamlined #2

Open
alban wants to merge 4 commits from feature-install into master

View File

@ -1,48 +1,39 @@
#!/bin/bash #!/bin/bash
sudo apt upgrade
sudo apt install python3-pip # Check if root
sudo apt install redis-server [[ 0 -ne $UID ]] && { echo "Must run as root. Exiting."; exit; }
# for dedicated computer after fresh linux install. todo : ask if needed.
#sudo apt install git # Require a user for exploitation
#sudo apt install syncthing DEFAULT=$(getent passwd 1000|cut -d: -f1)
#sudo apt install htop read -e -i "$DEFAULT" -p "Please provide the system user who will own the project: " USER
#sudo apt install screen
#sudo apt install tmux getent passwd "$USER" &>/dev/null || { echo "Sorry, but '$USER' does not exist on this system. Exiting."; exit 2; }
#sudo apt install nginx
#sudo apt install supervisor # Propose some packages
#sudo apt install ssh echo -e "\nThe following packages are not mandatory, add them as needed.\n"
# todo one day : modify correct path in syncthing.conf declare -a ADD_PACK
#sudo cp syncthing.conf to /etc/supervisor/conf.d/ POS_PACK=( htop nginx screen ssh ssl-cert supervisor syncthing tmux )
pip3 install scipy POS_PACK_LEN=${#POS_PACK[@]}
pip3 install numpy for i in ${!POS_PACK[@]} ; do
#pip install pygame==1.9.2 pack=${POS_PACK[i]}
#pip3 install pygame==1.9.2 read -e -n 1 -p "$((i+1))/${POS_PACK_LEN} Add package ${pack} ? [Y/n]: "
pip3 install redis REPLY=${REPLY:-Y}
pip3 install pysimpledmx [[ "Y" == ${REPLY^^} ]] && ADD_PACK+=(${pack})
pip3 install DMXEnttecPro done
sudo apt install libasound2-dev
sudo apt install libjack-dev # Propose the install
pip3 install python-rtmidi PACK_LIST=$( echo "cmake git libasound2-dev libjack-dev libsdl1.2-dev network-manager portaudio19-dev python3-dev python3-pip python3-rtmidi redis-server ${ADD_PACK[@]}" | sort )
pip3 install mido echo -e "\nYou are goind to install:\n$( for pack in ${PACK_LIST[@]}; do echo ' * '$pack; done; )\n"
git clone https://github.com/ptone/pyosc --depth 1 /tmp/pyosc && cd /tmp/pyosc && sudo ./setup.py install read -e -n1 -p "OK? [Y/n]: "
pip3 install tk REPLY=${REPLY:-Y}
cd ../ [[ "N" == ${REPLY^^} ]] && exit
python3 configure.py
# todo : ask for computer ip and run updateUI.py # Run the install
cd /tmp apt install -y --no-install-recommends $PACK_LIST
sudo apt install portaudio19-dev pip3 install setuptools
sudo apt install cmake pip3 install DMXEnttecPro mido numpy pysimpledmx redis scipy
git clone https://github.com/Ableton/link.git git clone https://github.com/ptone/pyosc --depth 1 /tmp/pyosc && cd /tmp/pyosc && ./setup.py install
cd link cd /tmp && git clone https://github.com/Ableton/link.git && cd link && git submodule update --init --recursive && mkdir build && cd build && cmake .. && cmake --build .
git submodule update --init --recursive cd /tmp/ && git clone --recursive https://github.com/gonzaloflirt/link-python.git && cd link-python && mkdir build && cd build && cmake .. && cmake --build .
mkdir build cd /opt/ && git clone https://git.interhacker.space/teamlaser/LJ
cd build chown -R $USER /opt/LJ
cmake ..
cmake --build .
cd /tmp/
git clone --recursive https://github.com/gonzaloflirt/link-python.git
cd link-python
mkdir build
cd build
cmake ..
cmake --build .