Created
October 14, 2021 02:56
-
-
Save ruibinx/379b2d4fb8687ebf54142792204d343a to your computer and use it in GitHub Desktop.
update submodule packages
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
FN=/tmp/emacs-update-sessions | |
function pull() { | |
FN=/tmp/emacs-update-sessions | |
touch $FN | |
PN=$(basename $(pwd)) | |
CNT=$(grep -c $PN /tmp/emacs-update-sessions) | |
echo $PN $CNT | |
if [ $CNT -ge 1 ]; then | |
echo skip | |
else | |
git checkout main || git checkout master; git pull && echo $PN >> $FN; | |
fi | |
} | |
export -f pull | |
git submodule foreach 'pull' && rm $FN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment