diff --git a/git_checkout_master_pull_all_submodules.sh b/git_checkout_master_pull_all_submodules.sh index ead4da07..0defe52e 100755 --- a/git_checkout_master_pull_all_submodules.sh +++ b/git_checkout_master_pull_all_submodules.sh @@ -1,6 +1,8 @@ #!/bin/bash -e git pull # you forget this -# ugh -# master=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main) # git submodule foreach --recursive 'git checkout master; git pull origin master:master; :' -git submodule foreach --recursive 'git checkout master; git pull origin master:master; :' +git submodule foreach --recursive ' + branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main); + git checkout $branch; + git pull origin $branch:$branch; +' diff --git a/git_checkout_master_pull_all_submodules_parallel.sh b/git_checkout_master_pull_all_submodules_parallel.sh index 0dc51abf..2412d8c2 100755 --- a/git_checkout_master_pull_all_submodules_parallel.sh +++ b/git_checkout_master_pull_all_submodules_parallel.sh @@ -1,4 +1,9 @@ #!/bin/bash -e git pull & -git submodule foreach --recursive 'git checkout master; git pull origin master:master & :' +# git submodule foreach --recursive 'git checkout master; git pull origin master:master & :' +git submodule foreach --recursive ' + branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main); + git checkout $branch; + git pull origin $branch:$branch & : +' wait diff --git a/git_checkout_master_push_all_submodules.sh b/git_checkout_master_push_all_submodules.sh index 23c39ea4..727507e4 100755 --- a/git_checkout_master_push_all_submodules.sh +++ b/git_checkout_master_push_all_submodules.sh @@ -5,6 +5,12 @@ # git submodule foreach --recursive 'git checkout master && git push origin master & :' # debug, stop at first failure -git submodule foreach --recursive 'git checkout master && git push origin master' - -git push origin master +# git submodule foreach --recursive 'git checkout master && git push origin master' +git submodule foreach --recursive ' + branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main); + git checkout $branch; + git push origin $branch; +' +# branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main); +# git push origin $branch +git push origin diff --git a/git_checkout_master_push_all_submodules_parallel.sh b/git_checkout_master_push_all_submodules_parallel.sh index ba1b6835..49512cac 100755 --- a/git_checkout_master_push_all_submodules_parallel.sh +++ b/git_checkout_master_push_all_submodules_parallel.sh @@ -1,4 +1,11 @@ #!/bin/bash -e -git submodule foreach --recursive 'git checkout master && git push origin master & :' -git push origin master +# git submodule foreach --recursive 'git checkout master && git push origin master & :' +git submodule foreach --recursive ' + branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main); + git checkout $branch; + git push origin $branch & : +' +# branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main); +# git push origin $branch +git push origin wait diff --git a/my-gym b/my-gym index 2c2f89c4..fc75a8f6 160000 --- a/my-gym +++ b/my-gym @@ -1 +1 @@ -Subproject commit 2c2f89c4bc72f18d4b970a4bc099893837b3129e +Subproject commit fc75a8f65b27beec5e4e03b805e61a3785ed0081 diff --git a/mybin b/mybin index 887277f4..5dd1bc78 160000 --- a/mybin +++ b/mybin @@ -1 +1 @@ -Subproject commit 887277f48772b50653584c7ccc4a718ce3946fef +Subproject commit 5dd1bc78b97375d0d84f3964d7cd0be8dfd96788