From eeaf6b496cdfa04749aa6ee0ea5870f9bc60f08c Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 4 Oct 2013 00:10:59 +0100 Subject: [PATCH] Include uninstall and clean commands --- bin/dotify | 36 ++++++++++++++++++++++++------------ src/bin/dotify | 6 ++++-- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/bin/dotify b/bin/dotify index 67dd268..97e7191 100755 --- a/bin/dotify +++ b/bin/dotify @@ -253,12 +253,18 @@ parse-dotfile-option() { # Command functions # -dotify-version() { - echo "0.0.1" +dotify-clean() { + DOTIFY_RUN_MODE="clean" + execute-dotfile + return $? } -dotify-print-version() { - echo "dotify $(dotify-version)" +dotify-compile() { + locate-dotfile + if [ "$?" != "0" ]; then return 1; fi + + compile-dotfile + return $? } dotify-help() { @@ -279,20 +285,26 @@ dotify-info() { echo " Target: $TARGET" } -dotify-compile() { - locate-dotfile - if [ "$?" != "0" ]; then return 1; fi - - compile-dotfile - return $? -} - dotify-install() { DOTIFY_RUN_MODE="install" execute-dotfile return $? } +dotify-uninstall() { + DOTIFY_RUN_MODE="uninstall" + execute-dotfile + return $? +} + +dotify-version() { + echo "0.0.1" +} + +dotify-print-version() { + echo "dotify $(dotify-version)" +} + # # Built-in Plugins diff --git a/src/bin/dotify b/src/bin/dotify index f1bfadc..0cfe727 100755 --- a/src/bin/dotify +++ b/src/bin/dotify @@ -49,11 +49,13 @@ source "../lib/internals/parse-dotfile-options.sh" # Command functions # -source "../lib/dotify-version.sh" +source "../lib/dotify-clean.sh" +source "../lib/dotify-compile.sh" source "../lib/dotify-help.sh" source "../lib/dotify-info.sh" -source "../lib/dotify-compile.sh" source "../lib/dotify-install.sh" +source "../lib/dotify-uninstall.sh" +source "../lib/dotify-version.sh" # # Built-in Plugins