Unify all "config" git wrapper under one
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d9fb0a060f
commit
5aeec94137
1 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,12 @@
|
|||
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} $@
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue