place ver check after cd
This commit is contained in:
parent
4f83c3b599
commit
d229f2afb5
@ -1,14 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#Version
|
|
||||||
hs_version=$(git describe --tags)
|
|
||||||
|
|
||||||
# cd to script, this ensures the script can find the source scripts below, even when ran from a seperate directory
|
# cd to script, this ensures the script can find the source scripts below, even when ran from a seperate directory
|
||||||
script=$(readlink -f "$0")
|
script=$(readlink -f "$0")
|
||||||
script_path=$(dirname "$script")
|
script_path=$(dirname "$script")
|
||||||
script_name="heavy_script.sh"
|
script_name="heavy_script.sh"
|
||||||
cd "$script_path" || { echo "Error: Failed to change to script directory" ; exit ; }
|
cd "$script_path" || { echo "Error: Failed to change to script directory" ; exit ; }
|
||||||
|
|
||||||
|
#Version
|
||||||
|
hs_version=$(git describe --tags)
|
||||||
|
|
||||||
source functions/backup.sh
|
source functions/backup.sh
|
||||||
source functions/dns.sh
|
source functions/dns.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user