feat: output force quit #29

Merged
张泊明518370910136 merged 3 commits from force-quit into master 2024-06-07 13:57:29 +08:00
Showing only changes of commit 2864100e6b - Show all commits

View File

@ -9,8 +9,8 @@ mkdir -p $submodules_dir
submodules=$(git config --file .gitmodules --get-regexp path | awk '{ print $2 }')
for submodule in $submodules; do
url=$(git config --file .gitmodules --get-regexp "submodule.$submodule.url" | awk '{ print $2 }')
branch=$(git config --file .gitmodules --get-regexp "submodule.$submodule.branch" | awk '{ print $2 }')
repo_name=$(echo $url | rev | cut -d'/' -f 1 | rev | cut -d'.' -f 1)
commit=$(git submodule status $submodule | awk '{ print $1 }' | sed 's/^[+-]//')
repo_dir="$tmp_dir/$repo_name"
if [[ ! -v repo_names["$repo_name"] ]]; then
if [ ! -d "$repo_dir" ]; then
@ -23,7 +23,7 @@ for submodule in $submodules; do
fi
repo_names[$repo_name]=1
cd $repo_dir
git checkout -q $commit
git checkout -q $branch
cd -
submodule_dir="$submodules_dir/$repo_name/$submodule"
mkdir -p $submodule_dir