Skip to content

Instantly share code, notes, and snippets.

@nwolverson
Created March 9, 2017 21:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwolverson/8838f3a4e2d72c4ed3380aa162438dcd to your computer and use it in GitHub Desktop.
Save nwolverson/8838f3a4e2d72c4ed3380aa162438dcd to your computer and use it in GitHub Desktop.
create psc-package.json from bower.json
#!/bin/bash
SET=${1:-"erl-0.10.5"}
SOURCE=${2:-"https://github.com/purerl/package-sets.git"}
if [ ! -f "psc-package.json" ]; then
jq < bower.json "{name, set: \"$SET\", source: \"$SOURCE\", depends: [] }" > psc-package.json
fi
jq < bower.json '.dependencies | keys | map(gsub("purescript-";"")) | join("\n")' -r | while read -r line ; do
psc-package install $line;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment