From 1c56eba533d5724ce01baf75f862da6ac9648455 Mon Sep 17 00:00:00 2001 From: Carlos Fenollosa Date: Thu, 7 Mar 2013 18:54:33 +0100 Subject: [PATCH] Fixed a bug with edit --- bb.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bb.sh b/bb.sh index e845cf7..c8f62d6 100755 --- a/bb.sh +++ b/bb.sh @@ -616,6 +616,13 @@ do_main() { exit fi + if [[ "$1" == "edit" ]]; then + if [[ $# -lt 2 ]] || [[ ! -f "$2" ]]; then + echo "Please enter a valid html file to edit" + exit + fi + fi + # Test for existing html files ls *.html &> /dev/null if [ $? -ne 0 ] && [ "$1" == "rebuild" ]; then