diff --git a/bin/startRuby b/bin/startRuby index 3c30999..1f41d49 100755 --- a/bin/startRuby +++ b/bin/startRuby @@ -5,12 +5,21 @@ gb=https://www.yatex.org/gitbucket/ repo=ssh://git@jdgb/JD2021student/Ruby.git +edom=itl.koeki-u.ac.jp if ! curl -s $gb/signin >/dev/null; then echo "No network" >&2; exit 1 fi start() { + if [ ! -s $HOME/.gitconfig ]; then + if ! grep -q user.email $HOME/.gitconfig; then + getent passwd `logname` | if IFS=: read u p uid gid gecos rest; then + git config --global user.name "$gecos" + git config --global user.email "$user@$edom" + fi + fi + fi if [ -d $HOME/Ruby/.git ]; then echo "Already have ~/Ruby directory" exit 0