add directory test to mobyconfig

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-04-08 13:23:23 +01:00
parent 5847bb7eb1
commit 9f5e02bbdf

View File

@ -2,7 +2,7 @@
if [ $# -ne 2 ]
then
printf "usage: $0 [get|exists|watch|path] key\n"
printf "usage: $0 [get|exists|watch|path|dir] key\n"
exit 0
fi
@ -40,6 +40,11 @@ then
[ -f ${BASE}/${KEY} ] && exit 0 || exit 1
fi
if [ $1 == "dir" ]
then
[ -d ${BASE}/${KEY} ] && exit 0 || exit 1
fi
if [ $1 == "get" ]
then
if [ -f ${BASE}/${KEY} ]
@ -80,5 +85,5 @@ then
fi
fi
printf "usage: $0 [get|exists|watch|path] key\n"
printf "usage: $0 [get|exists|watch|path|dir] key\n"
exit 1