diff --git a/src/bin/dotify b/src/bin/dotify index aee8897..480da48 100755 --- a/src/bin/dotify +++ b/src/bin/dotify @@ -1,5 +1,6 @@ #! /usr/bin/env bash set -e +shopt -s extglob [ -n "$DOTIFY_DEBUG" ] && set -x # dotify {{VERSION}} @@ -50,6 +51,7 @@ source "../lib/internals/parse-dotfile-options.sh" source "../lib/dotify-version.sh" source "../lib/dotify-help.sh" source "../lib/dotify-info.sh" +source "../lib/dotify-compile.sh" source "../lib/dotify-install.sh" # @@ -114,6 +116,9 @@ case "$command" in "info" ) dotify-info ;; + "compile" ) + dotify-compile + ;; "" | "install" ) dotify-install ;; diff --git a/src/lib/dotify-compile.sh b/src/lib/dotify-compile.sh new file mode 100644 index 0000000..ef8e034 --- /dev/null +++ b/src/lib/dotify-compile.sh @@ -0,0 +1,7 @@ +dotify-compile() { + locate-dotfile + if [ "$?" != "0" ]; then return 1; fi + + compile-dotfile + return $? +}