Commit 85602e1a authored by Vitaly Lipatov's avatar Vitaly Lipatov

tune_new_user.sh: fill .rpmmacros

parent 8df70959
#!/bin/sh
# user setup
CONSOLEFONT="Droid Sans Mono 11"
#NU="$1"
NU="$USER"
DOMAIN="etersoft.ru"
CONSOLEFONT="Droid Sans Mono 11"
[ -n "$NU" ] || exit
# skip for these users
......@@ -16,10 +17,28 @@ case "$NU" in
esac
NAME="$(getent passwd "$NU" | cut -d":" -f5)"
[ -n "$NAME" ] || exit
LATNAME="$NAME"
EMAIL="$NU@$DOMAIN"
# TODO: revert and get latin name from git's user.name ?
# TODO: other source?
# set git
git config --global user.name "$NAME"
git config --global user.email "$NU@$DOMAIN"
git config --global user.name "$LATNAME"
git config --global user.email "$EMAIL"
if grep -q "^#%packager" ~/.rpmmacros ; then
cat <<EOF >~/.rpmmacros
%_tmppath /tmp/.private/$NU
%_topdir %_tmppath/RPM
%packager "$LATNAME" <$EMAIL>
%_gpg_name %packager
EOF
fi
# fix ssh config
if [ ! -s ~/.ssh/config ] || ! grep "^Host \*" ~/.ssh/config ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment