Skip to content

Instantly share code, notes, and snippets.

@josketres
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josketres/f7a970e55a2e61533206 to your computer and use it in GitHub Desktop.
Save josketres/f7a970e55a2e61533206 to your computer and use it in GitHub Desktop.
Bower wrapper
#!/usr/bin/env bash
# Bower wrapper script for UN*X
# https://gist.github.com/josketres/f7a970e55a2e61533206
bower_bin=bower
command bower >/dev/null 2>&1 || {
bower_bin=$HOME/.bowerw/bin/bower
echo "Global bower not found, using $bower_bin";
command $bower_bin >/dev/null 2>&1 || {
echo "$bower_bin not found, installing it";
npm install bower -g --prefix $HOME/.bowerw
}
}
command $bower_bin $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment