Last active
August 29, 2015 14:23
-
-
Save josketres/f7a970e55a2e61533206 to your computer and use it in GitHub Desktop.
Bower wrapper
This file contains hidden or 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
#!/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