Add support for relativ paths
This commit is contained in:
parent
08cee7696c
commit
0305137a72
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
INTERFACE_PATH=/home/andreas/.virtualenvs/borg_interface
|
||||
PATH=$PATH:$INTERFACE_PATH/bin/
|
||||
source $INTERFACE_PATH/bin/activate
|
||||
python3 $INTERFACE_PATH/backup_to_external.py
|
||||
SCRIPTPATH=$(dirname -- "$(readlink -e -- "$BASH_SOURCE")")
|
||||
PATH=$PATH:$SCRIPTPATH/bin/
|
||||
source $SCRIPTPATH/bin/activate
|
||||
python3 $SCRIPTPATH/backup_to_external.py
|
||||
exit 0
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
#!/bin/bash
|
||||
PATH=$PATH:borg_interface/bin/
|
||||
source borg_interface/bin/activate
|
||||
python3 borg_interface/main.py
|
||||
|
||||
# Get the current working directory
|
||||
SCRIPTPATH=$(dirname -- "$(readlink -e -- "$BASH_SOURCE")")
|
||||
|
||||
# add the bin directory to the path
|
||||
PATH=$PATH:$SCRIPTPATH/borg_interface/bin/
|
||||
|
||||
# activate the virtual environment
|
||||
source $SCRIPTPATH/borg_interface/bin/activate
|
||||
|
||||
# execute the main script
|
||||
python3 $SCRIPTPATH/borg_interface/main.py
|
||||
exit 0
|
||||
|
|
Reference in New Issue