From 576a01233218162ef6d6da08cf373817f67c45d2 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 3 Oct 2013 23:17:36 +0100 Subject: [PATCH] Add --dry-run argument --- src/bin/dotify | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/bin/dotify b/src/bin/dotify index 2f08183..cbde7a7 100755 --- a/src/bin/dotify +++ b/src/bin/dotify @@ -67,8 +67,9 @@ source "../plugins/git.sh" DOTFILE="" # --dotfile / -F TARGET="" # --target / -t -HELP="" # --help / -h FORCE="" # --force / -f +DRY_RUN="" # --dry-run / -d +HELP="" # --help / -h VERSION="" # --version / -v if has-argument dotfile F "$@"; then @@ -79,14 +80,18 @@ if has-argument target t "$@"; then TARGET="$(parse-argument target t "$@")" fi -if has-argument help h "$@"; then - HELP="1" +if has-argument dry-run d "$@"; then + DRY_RUN="1" fi if has-argument force f "$@"; then FORCE="1" fi +if has-argument help h "$@"; then + HELP="1" +fi + if has-argument version v "$@"; then VERSION="1" fi