Last active
August 29, 2015 14:13
-
-
Save brownman/eb13a83858eb75c9d386 to your computer and use it in GitHub Desktop.
git_blame_yonatan.sh
This file contains 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
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 | |
) | |
} |
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
[ 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