25 lines
509 B
Bash
Executable File
25 lines
509 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Hey man, met ton nom !"
|
|
echo "Regarde, comme ça:"
|
|
echo " $0 roberto"
|
|
exit
|
|
fi
|
|
|
|
|
|
CONFIG="/home/pi/git/gitconfig_$1"
|
|
|
|
if [ ! -f "$CONFIG" ]; then
|
|
echo "Ton fichier de configuration '$CONFIG' n'existe pas. :("
|
|
echo "Va voir dans le dossier ~/git"
|
|
exit
|
|
fi
|
|
|
|
|
|
git config --local include.path $CONFIG
|
|
|
|
echo "La configuration est bien chargée: '$CONFIG'. Enjoy !"
|
|
echo "Pour effacer la configuration, lancer:"
|
|
echo " git-stop"
|