We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7f8a30 commit acf7a87Copy full SHA for acf7a87
1 file changed
testvenv_setup.sh
@@ -0,0 +1,23 @@
1
+#!/bin/bash
2
+# setup_testing_venv.sh — Create testing_venv and link alias to ~/tests
3
+
4
+echo "[SETUP] Creating ~/venvs and ~/tests directories..."
5
+mkdir -p ~/venvs
6
+mkdir -p ~/tests
7
8
+echo "[SETUP] Creating virtual environment: testing_venv"
9
+python3 -m venv ~/venvs/testing_venv
10
11
+echo "[SETUP] Adding alias to ~/.bashrc"
12
+ALIAS_LINE="alias testvenv='source ~/venvs/testing_venv/bin/activate && cd ~/tests'"
13
+if ! grep -Fxq "$ALIAS_LINE" ~/.bashrc; then
14
+ echo "$ALIAS_LINE" >> ~/.bashrc
15
+ echo "[SETUP] Alias added to .bashrc"
16
+else
17
+ echo "[INFO] Alias already exists in .bashrc"
18
+fi
19
20
+echo "[SETUP] Reloading .bashrc"
21
+source ~/.bashrc
22
23
+echo "[DONE] You can now run: testvenv"
0 commit comments