Skip to content

Instantly share code, notes, and snippets.

@brownman
Last active August 29, 2015 14:13
Show Gist options
  • Save brownman/eb13a83858eb75c9d386 to your computer and use it in GitHub Desktop.
Save brownman/eb13a83858eb75c9d386 to your computer and use it in GitHub Desktop.
git_blame_yonatan.sh
yonatan_err ()
{
clear;
local pkgs='xsel cowsay xcowsay google-chrome-stable flite';
dpkg -S $pkgs &>/dev/null || ( sudo apt-get install $pkgs );
local file=/tmp/yonatan.err;
local cmd1='npm install -g';
local cmd2='npm link';
local cmd="$cmd1 && $cmd2";
cowsay 'interesting what yonatan is doing right now';
test -f $file && ( rm $file ) || true;
( echo $cmd; eval "$cmd" &> >( tee $file ) ) || false;
res=$?;
test $res -eq 0 && ( xcowsay '[OK] npm jobs' ) || ( local num=$( cat $file | wc -l );
( test $num -gt 20 ) && ( echo $file | xsel --clipboard );
xcowsay "lines: $num";
flite -t 'npm has error' &
xcowsay 'npm error - please report to Yonatan';
xcowsay 'updated clipboard';
google-chrome-stable 'https://dev.linnovate.net/projects/mean/issues/new' & disown
)
}
@brownman
Copy link
Author

[ installation ] add this script to your $HOME/.bashrc
[ what it does ] open a new issue page on redmine + update the clipboard with the error log
[user] paste to the textArea and describe the issue

@brownman
Copy link
Author

go to the dir which u had faced npm error;
run:
yonatan_err

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment