From 2bad78fea9a505e3d2dbf197ceeaed91ab160300 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 30 Sep 2025 21:22:14 +0800 Subject: [PATCH] fix: uncomment init --- tt/teabag.sh | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/tt/teabag.sh b/tt/teabag.sh index 6171c73..1e65251 100755 --- a/tt/teabag.sh +++ b/tt/teabag.sh @@ -29,8 +29,6 @@ systemcheck() { # create a list of repos setup() { -# rm -f "$CONF" - if [ -e "$CONF" ]; then echo "WARNING: $CONF already exists!" read -n1 -p "Delete and continue, edit and exit, or exit? (d/e/X) " confwarn @@ -38,7 +36,7 @@ setup() { echo case "$confwarn" in - d) echo rm -f "$CONF" + d) rm -f "$CONF" ;; e) sensible-editor "$CONF" return @@ -98,30 +96,30 @@ EOF # clone all repos init() { - # for i in ${REPOS[@]}; do - # git clone "$GITURL/$i" - # done + for i in ${REPOS[@]}; do + git clone "$GITURL/$i" + done - # echo "Set up: email, name, merge strategy, lfs" + echo "Set up: email, name, merge strategy, lfs" -# # for bots use a different email address - # read -p "Input the jaccount or bot account to use: " jaccount - # if [ -n "${jaccount%bot-*}" ]; then - # email=$jaccount@sjtu.edu.cn - # else - # email=$jaccount@focs.ji.sjtu.edu.cn - # fi +# for bots use a different email address + read -p "Input the jaccount or bot account to use: " jaccount + if [ -n "${jaccount%bot-*}" ]; then + email=$jaccount@sjtu.edu.cn + else + email=$jaccount@focs.ji.sjtu.edu.cn + fi - # read -p "Input your name: " name + read -p "Input your name: " name - # for j in ${REPOS[@]/*\/}; do - # cd $j - # git config user.email $email - # git config user.name "$name" - # git config pull.rebase true - # git lfs install > /dev/null - # cd .. - # done + for j in ${REPOS[@]/*\/}; do + cd $j + git config user.email $email + git config user.name "$name" + git config pull.rebase true + git lfs install > /dev/null + cd .. + done echo "Cloning JOJ repo" if [ -d "${REPOS[0]%/*}-joj" ]; then