2020-07-20 14:09:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-03-05 13:23:41 +00:00
|
|
|
repositories=$(git-pending "$@" \
|
2020-07-20 14:09:08 +00:00
|
|
|
| grep '^ahead' \
|
|
|
|
| lua -e 'for line in io.lines() do print(line:match("[^/]+$")); print((line:gsub("^[^ ]* ", ""))) end' \
|
2021-03-05 13:23:41 +00:00
|
|
|
)
|
2021-03-05 13:29:35 +00:00
|
|
|
if [ -z "$repositories" ]
|
2022-03-22 13:31:10 +00:00
|
|
|
then
|
|
|
|
notify-send Git "No pending repositories"
|
|
|
|
exit
|
2021-03-05 13:29:35 +00:00
|
|
|
fi
|
2021-03-05 13:23:41 +00:00
|
|
|
echo "$repositories" \
|
2020-07-21 17:29:13 +00:00
|
|
|
| zenity --list --column Repository --column Path --text "Repositories that need pushing:" --multiple --title "Git" --separator ';' --width 800 --height 300 --print-column=2 2>/dev/null \
|
2020-07-20 14:09:08 +00:00
|
|
|
| tr ';' '\n' \
|
2021-03-05 13:30:22 +00:00
|
|
|
| xargs -P`nproc` -L 1 -I€ sh -c 'cd € && git push'
|
2021-03-05 13:32:48 +00:00
|
|
|
notify-send Git 'Pushed everything 🎉'
|