Code: Select all
#!/bin/sh
#Script to configure and clone remote repositories automatically
#27122013 written by D-coy
#27122013, GPL3 (/usr/share/doc/legal)
#28122013 nilsonmorales help lines and English version
# settings for username and email
echo -n 'Enter your Username: '
read username
if git config --global user.name $username 2>/dev/null ; then
git config --global user.name $username
echo -n 'Enter your Email: '
read email
git config --global user.email $email
#General settings
#You can add your own settings here
git config --global core.editor geany
git config --global core.pager ''
git config --global color.ui true
git config --global http.sslVerify false
git config --global push.default matching
git config --global push.default simple
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
echo -n "Do you want to clone a repo? y/n: "
read clone
if [ "$clone" == "y" ]; then
#Enter address repository
#Ex: https://github.com/nilsonmorales/Badass
echo -n "Repo URL: "
read repo
git clone $repo
fi
else
echo 'Need "git" package installed...'
exit
fi