-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9771d7b
commit c7633b8
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |