diff --git a/install_student.sh b/install_student.sh new file mode 100644 index 0000000000000000000000000000000000000000..323cabf270a29a8eefcb4b50030082490daeec9d --- /dev/null +++ b/install_student.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +echo "Ce programme va installer EasyCom sur cet ordinateur." +echo "Appuyez sur [ENTRÉE] pour continuer ou Ctrl+C pour annuler" +read -p + +echo "Installing fastapi and uvicorn" +pip install --break-system-packages fastapi uvicorn + +git clone https://gitlab.univ-lille.fr/ethan.robert.etu/easycom.git ~/.easycom-temp +echo "Copying files" +mkdir ~/.easycom +cp -r ~/.easycom-temp/Student/API/* ~/.easycom + +mkdir ~/.bin +cp - ~/.easycom-temp/Student/easycom ~/.bin + +echo "Making things executable" +chmod +x ~/.bin/easycom +chmod +x ~/.easycom/start.sh + +echo "Adding API to ~/.bashrc" +echo "sh -c '~/.easycom/start.sh' & disown" >> ~/.bashrc + +echo "export PATH='~/.bin:$PATH'" >> ~/.bashrc + +echo +echo + +echo "Congratulations!" +echo "EasyCom is now installed! The API will auto start on session startup" +echo + +echo "To run the tool, just type:" +echo "$ easycom"