diff --git a/sync.sh b/sync.sh index eaae9d5..b215505 100644 --- a/sync.sh +++ b/sync.sh @@ -1,12 +1,13 @@ DATAPUB_APP=${1:='https://github.com/datopian/datapub'} git clone $DATAPUB_APP datapub -cd datapub && npm install . && npm run build wget https://raw.githubusercontent.com/johanhaleby/bash-templater/master/templater.sh +cd datapub && npm install . && npm run build for x in $(ls build/static/js/*.js build/static/css/*.css); do - bundles=$bundles"\{\% resource '$x' \%\}"\\n + bundles=$bundles"\{\% resource \"${x}\" \%\}"\\n done -cp -r build/static/* datapub/fanstatic/ -export RESOURCES=$(python -c "import sys;print(sys.argv[1].replace('build/static','datapub/fanstatic'))" "$bundles") +cp -r build/static/* ../ckanext/datapub/fanstatic/ cd .. + +export RESOURCES=$(python -c "import sys;print(sys.argv[1].replace('build/static','datapub'))" "$bundles") bash templater.sh ckanext/datapub/templates/datapub/snippets/upload_module.template > ckanext/datapub/templates/datapub/snippets/upload_module.html