Add git-push-pending bash script

This commit is contained in:
Talia 2020-07-20 16:09:08 +02:00
parent 1d02c8e114
commit f934cf59e1
1 changed files with 9 additions and 0 deletions

9
bin/git-push-pending Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
(echo $HOME/darkrc; echo $HOME/me; find $HOME/workspace/ -name '*.git' -type d | sed 's/\/.git$//') \
| xargs git-pending \
| grep '^ahead' \
| lua -e 'for line in io.lines() do print(line:match("[^/]+$")); print((line:gsub("^[^ ]* ", ""))) end' \
| zenity --list --column Repository --column Path --text "Repositories that need pushing:" --multiple --title "Git" --separator ';' --width 800 --height 300 --print-column=2 \
| tr ';' '\n' \
| xargs -L 1 -I€ sh -c 'cd € && git push'