Commit 9df66c3f authored by tiagof's avatar tiagof
Browse files

change install.sh script to make git pull

parent 7efff243
#!/bin/bash
sudo apt-get update
sudo apt-get -y install python3-pip
pip3 install numpy
pip3 install pyqt5
sudo apt-get -y install pyqt5-dev
sudo apt-get -y install python3-pyqt5
sudo apt-get -y install pyqt5-dev-tools
sudo apt-get -y install qttools5-dev-tools
pip3 install pyqtgraph
pip3 install pyserial
sudo apt-get -y install git
git clone https://gitlab.ethz.ch/tiagof/TempLogger.git ~/Logger
cp ~/Logger/Polarization.desktop ~/Desktop/
cp ~/Logger/TempLogger.desktop ~/Desktop/
cp ~/Logger/Cryoscopy.desktop ~/Desktop/
#ln -s ~/Logger/TempLogger.pyx ~/Desktop/
#ln -s ~/Logger/Polarization.pyx ~/Desktop/
sudo usermod -a -G dialout $USER
DIR_I="$HOME/Logger"
#OPTIONAL TOOLS
sudo apt-get -y install htop
update_program () {
git -C $DIR_I pull
}
install_program () {
sudo apt-get update
sudo apt-get -y install python3-pip
pip3 install numpy
pip3 install pyqt5
sudo apt-get -y install pyqt5-dev
sudo apt-get -y install python3-pyqt5
sudo apt-get -y install pyqt5-dev-tools
sudo apt-get -y install qttools5-dev-tools
pip3 install pyqtgraph
pip3 install pyserial
sudo apt-get -y install git
git clone https://gitlab.ethz.ch/tiagof/TempLogger.git $DIR_I
cp $DIR_I/Polarization.desktop ~/Desktop/
cp $DIR_I/TempLogger.desktop ~/Desktop/
cp $DIR_I/Cryoscopy.desktop ~/Desktop/
sudo usermod -a -G dialout $USER
#OPTIONAL TOOLS
sudo apt-get -y install htop
#Maybe needed?
#sudo apt-get install software-properties-common
......@@ -34,4 +39,14 @@ sudo apt-get -y install htop
#Requirement already satisfied: pyqtgraph in /home/user/.local/lib/python3.8/site-packages (0.11.0)
#Requirement already satisfied: numpy>=1.8.0 in /home/user/.local/lib/python3.8/site-packages (from pyqtgraph) (1.18.5)
#Requirement already satisfied: pyserial in /home/user/.local/lib/python3.8/site-packages (3.4)
}
if [ -d "$DIR_I" ]; then
###if $DIR exists ###
echo "Updating program in ${DIR_I} Folder"
update_program
else
###if $DIR does NOT exist ###
echo "Installing program in: ${DIR_I} Folder."
install_program
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment