diff --git a/export_settings.sh b/export_settings.sh index 81546ac..ae21cb8 100755 --- a/export_settings.sh +++ b/export_settings.sh @@ -1,23 +1,20 @@ #!/bin/bash # this will read all html files and replace dj-* attributes with django code -# YOU MAY NEED TO copy the python export.py script to the same folder as where BSS app image is located logfile="/tmp/bss_export.log" -cwd=`pwd` +export_script=$(realpath export.py) + +cd $1 # if you have a venv setup, replace the following source ~/venv/django-bss-tools/bin/activate echo "run at `date`" >> $logfile echo "`which python3`" >> $logfile -echo $cwd >> $logfile echo $1 >> $logfile -pushd $1 for f in *.html do echo python3 $cwd/export.py $f >> $logfile - python3 $cwd/export.py $f + python3 $export_script $f done -popd -