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