Skip to content

Instantly share code, notes, and snippets.

@zyla
Created May 20, 2018 07:20
Show Gist options
  • Save zyla/dd471a0b9f2324c9665b65b34ffc22ca to your computer and use it in GitHub Desktop.
Save zyla/dd471a0b9f2324c9665b65b34ffc22ca to your computer and use it in GitHub Desktop.
#!/bin/sh
# Bump PureScript dependencies in `bower.json` to `#compiler/0.12`.
set -e
awk '
{
if (/ "purescript-*/ && ! /#compiler\/0.12/) {
if(/#/) {
gsub(/#.*"/, "#compiler/0.12\"");
} else {
gsub(/: ".*"/, ": \"#compiler/0.12\"");
}
}
print;
}
' bower.json > .bower.json.tmp
mv .bower.json.tmp bower.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment