From d9db5f2def7a1dd2c8e76195df1ea1a988b6b79e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Aug 2008 14:21:43 -0400 Subject: [PATCH] Bail if both srcdir and repository are not specified. --- debian/changelog | 2 ++ ikiwiki-makerepo | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f40701691..b784c95b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ ikiwiki (2.60) UNRELEASED; urgency=low * ikiwiki-update-wikilist: Add -r switch to remove. Default behavior is now always to add. * Start moving admin preferences from the web interface to the setup file. + * ikiwiki-makerepo: Bail if both srcdir and repository are not specified. + Closes: #493628 -- Joey Hess Mon, 21 Jul 2008 11:35:46 -0400 diff --git a/ikiwiki-makerepo b/ikiwiki-makerepo index d249e5e75..b733bd13a 100755 --- a/ikiwiki-makerepo +++ b/ikiwiki-makerepo @@ -4,7 +4,7 @@ set -e rcs="$1" srcdir="$2" repository="$3" - + usage () { echo "usage: ikiwiki-makerepo svn|git srcdir repository" >&2 echo " ikiwiki-makerepo bzr|mercurial srcdir" >&2 @@ -21,6 +21,10 @@ if [ ! -d "$srcdir" ]; then fi if [ "$rcs" != mercurial ] && [ "$rcs" != bzr ]; then + if [ -z "$repository" ]; then + echo "you need to specify both a srcdir and a repository for $rcs" >&2 + usage + fi if [ -e "$repository" ]; then echo "repository $repository already exists, aborting" >&2 exit 1 -- 2.32.0.93.g670b81a890