The script now copies raspi-blinka.py and temp-calc.py file to temp-sensor folder created in desktop.

This commit is contained in:
K 2024-10-07 00:58:42 +05:30
parent 25d26828f6
commit e15f80d0c6
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

View File

@ -64,6 +64,7 @@ PROJECT_DIR="/home/$USER/Desktop/temp-sensor"
if [ ! -d "$PROJECT_DIR" ]; then
echo -e "$line\nCreating 'temp-sensor' in Desktop directory for current user.\n$line\n"
mkdir -p "$PROJECT_DIR"
cp "./raspi-blinka.py" "./temp-calc.py" "$PROJECT_DIR/"
echo -e "$line\nCreated '$PROJECT_DIR' directory.\n$line\n"
else
echo -e "$line\n$PROJECT_DIR already exists. Please delete the folder before running this script.\n$line\n\nExiting..."
@ -72,6 +73,7 @@ fi
# Create and activate Python virtual environment
cd "$PROJECT_DIR"
chmod ugo+x ./raspi-blinka.py ./temp-calc.py
python3 -m venv . --system-site-packages
echo -e "$line\nVirtual environment created.\n$line\n"
echo -e "$line\nActivating virtual environment...\n$line\n"