From daa9b8abfd2ded6e55e3185eb4cbe231cbf5ed69 Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Fri, 30 Mar 2018 13:12:35 +0530 Subject: [PATCH] [bugfix] Fixed command dotgit not parsing all params --- scripts/mkr.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/mkr.sh b/scripts/mkr.sh index ab1d648..da97f3f 100644 --- a/scripts/mkr.sh +++ b/scripts/mkr.sh @@ -60,17 +60,17 @@ alias dot-git-cmd="git --git-dir=$HOME/.dotfiles --work-tree=$HOME" # Manage dotfiles repo # Usage: dotgit [commands...] dotgit () { - if [[ $1 == "-d" || $1 == "--diff" ]]; then + if [[ "$1" == "-d" || "$1" == "--diff" ]]; then dot-git-cmd diff - elif [[ $1 == "-u" || $1 == "--update" ]]; then - dot-git-cmd add $HOME - dot-git-cmd commit -m date - elif [[ $1 == "-p" || $1 == "--push" ]]; then + elif [[ "$1" == "-u" || "$1" == "--update" ]]; then dot-git-cmd add $HOME + dot-git-cmd commit -m "$(date)" + elif [[ "$1" == "-p" || "$1" == "--push" ]]; then + dot-git-cmd add "$HOME" dot-git-cmd commit -m date dot-git-cmd push else - dot-git-cmd $1 + dot-git-cmd "$1" fi }