source_me.sh 258 Bytes
Newer Older
Thom Wiggers's avatar
Thom Wiggers committed
1
#!/bin/bash
Thom Wiggers's avatar
Thom Wiggers committed
2
pathname=$_
Thom Wiggers's avatar
Thom Wiggers committed
3

Thom Wiggers's avatar
Thom Wiggers committed
4
if [[ "$pathname" != "$0" ]]; then
Thom Wiggers's avatar
Thom Wiggers committed
5
    echo "Remember: you need to run me as 'source ./source_me.sh', execute it!"
Thom Wiggers's avatar
Thom Wiggers committed
6
7
    return
fi
Thom Wiggers's avatar
Thom Wiggers committed
8
9
10
11
12
13
14

if [ -d venv ]; then
    source venv/bin/activate
else
    pyvenv venv
    source venv/bin/activate
fi