Merge pull request #35 from shkitch/master

This commit is contained in:
Tim Byrne 2017-01-06 16:27:24 -06:00
commit 2033e5673e
No known key found for this signature in database
GPG Key ID: 6CBE24C2FD8CF76E
1 changed files with 6 additions and 4 deletions

10
yadm
View File

@ -43,6 +43,7 @@ function main() {
[ -d "$YADM_DIR" ] || mkdir -p "$YADM_DIR" [ -d "$YADM_DIR" ] || mkdir -p "$YADM_DIR"
#; parse command line arguments #; parse command line arguments
local retval=0
internal_commands="^(alt|clean|clone|config|decrypt|encrypt|help|init|list|perms|version)$" internal_commands="^(alt|clean|clone|config|decrypt|encrypt|help|init|list|perms|version)$"
if [ -z "$*" ] ; then if [ -z "$*" ] ; then
#; no argumnts will result in help() #; no argumnts will result in help()
@ -86,13 +87,14 @@ function main() {
else else
#; any other commands are simply passed through to git #; any other commands are simply passed through to git
git_command "$@" git_command "$@"
retval="$?"
fi fi
#; process automatic events #; process automatic events
auto_alt auto_alt
auto_perms auto_perms
exit 0 exit $retval
} }
@ -299,11 +301,11 @@ function git_command() {
set -- "config" "${@:2}" set -- "config" "${@:2}"
fi fi
#; pass commands through to git
git "$@"
CHANGES_POSSIBLE=1 CHANGES_POSSIBLE=1
#; pass commands through to git
git "$@"
return "$?"
} }
function help() { function help() {