From 0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 27 Oct 2013 15:14:18 +0100 Subject: o Dropping the CSV file for using a native app config file instead. o Using apache as an example app. o Adding appstore-add-app as a utility to register appliations. --- lib/common | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/common') diff --git a/lib/common b/lib/common index 473c8b1..2214480 100755 --- a/lib/common +++ b/lib/common @@ -62,3 +62,17 @@ grep_path() { find `echo $path | tr : " "` -type f -executable 2>/dev/null | (egrep "$regex" || exit 0) } + +assert_valid_app_name() { + local app="$1"; shift + + local re="^[a-zA-Z][a-zA-Z0-9]*$" + if [[ ! $app =~ $re ]] + then + fatal "Invalid app name: \"$app\"" + fi +} + +# Save for later +usage_app=${0##*/} +echo_debug=${echo_debug-no} -- cgit v1.2.3