From b26031c4ea84f6ffe680ea995a0dfb29bd032434 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 3 Oct 2013 23:04:33 +0100 Subject: [PATCH] Add dotify-compile command --- src/bin/dotify | 5 +++++ src/lib/dotify-compile.sh | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 src/lib/dotify-compile.sh 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 $? +}