summaryrefslogtreecommitdiff
path: root/home/xyz/.local
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-10-20 15:51:59 -0700
committerxyz <gky44px1999@gmail.com>2021-10-20 15:51:59 -0700
commitc56c1c6d5933856aa3c26e37aea023554acd53ce (patch)
tree864d3b48f700ffe54ccd6221894d93e2747000ef /home/xyz/.local
parent7e90acd9c707b895c04fa981de1cd1ae83e3eeac (diff)
refactor
Diffstat (limited to 'home/xyz/.local')
-rwxr-xr-xhome/xyz/.local/bin/cfg8
-rwxr-xr-xhome/xyz/.local/bin/gita4
2 files changed, 6 insertions, 6 deletions
diff --git a/home/xyz/.local/bin/cfg b/home/xyz/.local/bin/cfg
index ea059322..56ba6d71 100755
--- a/home/xyz/.local/bin/cfg
+++ b/home/xyz/.local/bin/cfg
@@ -2,13 +2,13 @@
while getopts clsmM opt; do
case $opt in
- c) dir="$HOME"
- cmd="git --git-dir=$dir/.cfg$opt/ --work-tree=$dir"
+ c) work_tree_dir="$HOME"
+ cmd="git --git-dir=$HOME/.cfg$opt/ --work-tree=$HOME"
meta_file="$XDG_CONFIG_HOME/myconf/cfg${opt}_meta";;
- l|s) dir=/
+ l|s) work_tree_dir=/
cmd="sudo git --git-dir=/etc/.cfg$opt/ --work-tree=/"
meta_file="/etc/myconf/cfg${opt}_meta";;
- m) sudo gitmetap "$cmd" "$dir" "$meta_file"
+ m) sudo gitmetap "$cmd" "$work_tree_dir" "$meta_file"
exit;;
M) sudo gitmetar "$meta_file"
exit;;
diff --git a/home/xyz/.local/bin/gita b/home/xyz/.local/bin/gita
index a3d0dbc9..13360d0e 100755
--- a/home/xyz/.local/bin/gita
+++ b/home/xyz/.local/bin/gita
@@ -3,9 +3,9 @@
cmd='git'
-while getopts clLsS f; do
+while getopts cls f; do
case $f in
- c|l|L|s|S) cmd="cfg -$f";;
+ c|l|s) cmd="cfg -$f";;
\?) exit 1;;
esac
done