From 6cba50ada1436e62b0e7a366075b2a9b9659e09a Mon Sep 17 00:00:00 2001 From: Ethan Robert <ethan.rbrt90@gmail.com> Date: Wed, 26 Feb 2025 16:52:56 +0100 Subject: [PATCH] Added install script for student side --- install_student.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 install_student.sh diff --git a/install_student.sh b/install_student.sh new file mode 100644 index 0000000..323cabf --- /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" -- GitLab