Skip to content

Commit

Permalink
Fix the create template
Browse files Browse the repository at this point in the history
  • Loading branch information
mariorodeghiero authored Nov 12, 2020
1 parent 9771d7b commit c7633b8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sync.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c7633b8

Please sign in to comment.