make gitcopy -t work in ubuntu by determining whether pbcopy exists
This commit is contained in:
parent
86ec34cfd5
commit
fe1a13a783
@ -150,9 +150,13 @@ function gitcopy() {
|
|||||||
done
|
done
|
||||||
prefix=`git remote get-url origin | sed -E 's/git@github.com:/https:\/\/github.com\//g' | sed -E 's/(.*)\.git/\1/'`
|
prefix=`git remote get-url origin | sed -E 's/git@github.com:/https:\/\/github.com\//g' | sed -E 's/(.*)\.git/\1/'`
|
||||||
project_name=`echo $prefix | sed -E 's/.*\/(.*)/\1/'`
|
project_name=`echo $prefix | sed -E 's/.*\/(.*)/\1/'`
|
||||||
git log $commit --pretty="* [$project_name]($prefix/commit/%H) %an: **%s**" | head -n $n | tee >(pbcopy)
|
commits=`git log $commit --pretty="* [$project_name]($prefix/commit/%H) %an: **%s**" | head -n $n`
|
||||||
|
which pbcopy
|
||||||
|
if [[ $? == '0' ]]; then
|
||||||
|
echo $commits | pbcopy
|
||||||
|
fi
|
||||||
if [[ "$trelloCardName" != '' ]]; then
|
if [[ "$trelloCardName" != '' ]]; then
|
||||||
ruby ~/Projects/rallets-hub/bin/create_trello_todo_card.rb -n $trelloCardName -d "$(pbpaste)"
|
ruby ~/Projects/rallets-hub/bin/create_trello_todo_card.rb -n $trelloCardName -d "$commits"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user