mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
add directory test to mobyconfig
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
5847bb7eb1
commit
9f5e02bbdf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user