2020-11-04 21:31:18 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
|
|
echo "Hey man, met ton nom !"
|
|
|
|
echo "Regarde, comme ça:"
|
|
|
|
echo " $0 roberto"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2020-11-05 12:16:02 +00:00
|
|
|
CONFIG="/home/pi/outils/git-multi-user/gitconfig_$1"
|
2020-11-04 21:31:18 +00:00
|
|
|
|
|
|
|
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"
|