Selaa lähdekoodia

bin/dao: execute run_demo regardless of pwd

Dastan-glitch 3 vuotta sitten
vanhempi
sitoutus
5c346b44e4
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      bin/dao/dao-cli/run_demo.sh

+ 1 - 1
bin/dao/dao-cli/run_demo.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-dao="../../../dao"
+dao="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../.. && pwd )/dao"
 
 $dao create 110 110 1 2
 addr=$($dao addr | cut -d " " -f 4)