diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-27 15:14:18 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-27 15:14:18 +0100 |
commit | 0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4 (patch) | |
tree | 7807b9d017e44bc522a75f40c7a4589d994455f8 /lib | |
parent | 5821a949035a5e098a2c6b395818f5efa1c66f8e (diff) | |
download | appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.tar.gz appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.tar.bz2 appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.tar.xz appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.zip |
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.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/common | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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} |