fix(exec):Camera script and daily job script
[EVA-2020-02.git] / exec / photograph / update_temp_photograph.sh
old mode 100644 (file)
new mode 100755 (executable)
index 0489b8d..5b380c3
@@ -9,7 +9,9 @@ temp_dir="/dev/shm"; # default
 iso_date="$(date +%Y%m%dT%H%M%S%z)";
 #iso_date_ns="$(date +%Y%m%dT%H%M%S.%N%z)";
 device_hostname="$(hostname)";
 iso_date="$(date +%Y%m%dT%H%M%S%z)";
 #iso_date_ns="$(date +%Y%m%dT%H%M%S.%N%z)";
 device_hostname="$(hostname)";
-nfg_base_dir="../../"; # root directory of ninfacyzga-1 git repo
+
+script_path="$(dirname "$(realpath -s "$0")")"; # Get script dir Ref/Attrib: https://stackoverflowcom/questions/4774054/
+nfg_base_dir="$script_path/../../"; # root directory of ninfacyzga-1 git repo
 nfg_unitproc_path="$nfg_base_dir"/exec/unitproc;
 sleep_rand_path="$nfg_base_dir"/exec/unitproc/sleepRand.py;
 PATH="$nfg_unitproc_path:$PATH"; # include unitprocess nfg executables
 nfg_unitproc_path="$nfg_base_dir"/exec/unitproc;
 sleep_rand_path="$nfg_base_dir"/exec/unitproc/sleepRand.py;
 PATH="$nfg_unitproc_path:$PATH"; # include unitprocess nfg executables