Skip to content

Instantly share code, notes, and snippets.

@narqo
Created April 3, 2013 10:11
Show Gist options
  • Save narqo/5299979 to your computer and use it in GitHub Desktop.
Save narqo/5299979 to your computer and use it in GitHub Desktop.
Workaround about local bem-tools installation
#!/usr/bin/env bash
npm_bem=`npm bin`/bem
home_bem=$HOME/bin/bem
global_bem=bem
bem_=$global_bem
if [ -f "$npm_bem" ]; then
bem_=$npm_bem
elif [ -f "$home_bem" ]; then
bem_=$home_bem
fi
echo "Using \"$bem_\""
$bem_ $*
unset npm_bem
unset home_bem
unset global_bem
unset bem_
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment