improvement: Use BASH_SOURCE in emumba install script
So the script doesn't require the working dir to be its dir. This is particular useful because it means we can execute this script when we create/start new docker containers, via docker exec in a script like start_docker.sh.
This commit is contained in:
1 parent
39bc80263c
commit
4aaae5b1eb
1 file changed
+4
-1
@@ -4,7 +4,10 @@ edc="deribit-version-3-3-1_31-07-2023"
|
||||
edc_zip="${edc}.tar.gz"
|
||||
edc_deb="emumba-deribit-connector-3.3.1-Linux.deb"
|
||||
|
||||
root=`realpath ../..`
|
||||
this_script="$(realpath "${BASH_SOURCE[0]}")"
|
||||
this_script="$(readlink -f "$this_script")"
|
||||
root="$(realpath "$(dirname "$this_script")/../..")"
|
||||
|
||||
work=$root/work
|
||||
src=$root/src
|
||||
|
||||
|
||||
Reference in new issue
Block a user