Unify all "config" git wrapper under one

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-03-04 23:09:10 +01:00
parent d9fb0a060f
commit 5aeec94137
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,7 +1,12 @@
function config { function config {
git --git-dir=${HOME}/.cfg/public --work-tree=${HOME} $@ repo_name=$1
shift
if ! [ -d ${HOME}/.cfg/${repo_name} ]; then
echo "Repo '${repo_name}' not found!"
return 1
fi
git --git-dir=${HOME}/.cfg/${repo_name} --work-tree=${HOME} $@
} }
function config_secret {
git --git-dir=${HOME}/.cfg/secret --work-tree=${HOME} $@
}