2024-06-27 05:08:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-06-27 07:24:32 +00:00
|
|
|
if [[ $1 == "Debian" ]]; then
|
|
|
|
|
|
|
|
echo "$1 git-setup"
|
|
|
|
echo "apt-get install git"
|
|
|
|
|
|
|
|
elif [[ $1 == "Arch" ]]; then
|
|
|
|
|
|
|
|
echo "$1 git-setup"
|
|
|
|
echo "pacman -S git"
|
|
|
|
while [[ true ]]; do
|
|
|
|
read -p "Git Setup: Enter your full name: " name
|
|
|
|
read -p "Git Setup: Enter your email address: " email
|
|
|
|
if [[ ! -z $name && ! -z $email ]]; then
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo "Invalid name or address, Please re-enter"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
echo "git config --global user.name $name"
|
|
|
|
echo "git config --global user.email $email"
|
|
|
|
|
|
|
|
fi
|