|
|
@ -1,9 +1,5 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
color_ok='\033[1;32m'
|
|
|
|
|
|
|
|
color_err='\033[0;31m'
|
|
|
|
|
|
|
|
color_none='\033[0m'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
path=$1
|
|
|
|
path=$1
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z $path ]
|
|
|
|
if [ -z $path ]
|
|
|
@ -18,6 +14,8 @@ then
|
|
|
|
path=$WAPPALYZER_ROOT
|
|
|
|
path=$WAPPALYZER_ROOT
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d $path/src ]
|
|
|
|
if [ ! -d $path/src ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo "-$(basename $0): Incorrect path"
|
|
|
|
echo "-$(basename $0): Incorrect path"
|
|
|
@ -29,17 +27,4 @@ path="$path/src"
|
|
|
|
|
|
|
|
|
|
|
|
echo "Validating apps.json..."
|
|
|
|
echo "Validating apps.json..."
|
|
|
|
|
|
|
|
|
|
|
|
echo -en "${color_err}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jsonlint --quiet -V $WAPPALYZER_ROOT/schema.json $path/apps.json
|
|
|
|
jsonlint --quiet -V $WAPPALYZER_ROOT/schema.json $path/apps.json
|
|
|
|
|
|
|
|
|
|
|
|
if [ $? -eq 0 ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
echo -e "${color_ok}Ok${color_none}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo -en "${color_none}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|