runner-images/bin/joj3-forge-convert
张泊明518370910136 2188fadd9d
All checks were successful
push / build (push) Successful in 3m38s
feat: set git user name & email
2025-06-03 21:57:15 -04:00

17 lines
571 B
Bash
Executable File

#!/usr/bin/bash
set -e
COURSE=$1
REPO_PATH=/home/tt/.cache/$COURSE-config
GIT_USER=$(whoami)
GIT_HOSTNAME=$(hostname -s)
GIT_EMAIL="${GIT_USER}@${GIT_HOSTNAME}"
git -C $REPO_PATH pull
rsync -r --delete $REPO_PATH/home/tt/.config/ /home/tt/.config
joj3-forge convert /home/tt/.config/joj
rsync -r --delete /home/tt/.config/joj/ $REPO_PATH/home/tt/.config/joj
git -C $REPO_PATH config user.name $GIT_USER
git -C $REPO_PATH config user.email $GIT_EMAIL
git -C $REPO_PATH add home/tt/.config/joj
git -C $REPO_PATH commit -m "chore: joj3-forge convert"
git -C $REPO_PATH push