Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Grunt-cli wrapper
#!/usr/bin/env bash
# Grunt-cli wrapper script for UN*X
grunt_check=" --version"
log_prefix="\e[95mgruntw\e[0m -"
command $grunt_bin $grunt_check >/dev/null 2>&1 || {
echo -e "$log_prefix Global grunt-cli not found, using $grunt_bin"
command $grunt_bin $grunt_check >/dev/null 2>&1 || {
echo -e "$log_prefix $grunt_bin not found, installing it"
npm install grunt-cli -g --prefix $HOME/.gruntw
command $grunt_bin $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment