mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +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 ]
|
if [ $# -ne 2 ]
|
||||||
then
|
then
|
||||||
printf "usage: $0 [get|exists|watch|path] key\n"
|
printf "usage: $0 [get|exists|watch|path|dir] key\n"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -40,6 +40,11 @@ then
|
|||||||
[ -f ${BASE}/${KEY} ] && exit 0 || exit 1
|
[ -f ${BASE}/${KEY} ] && exit 0 || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $1 == "dir" ]
|
||||||
|
then
|
||||||
|
[ -d ${BASE}/${KEY} ] && exit 0 || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $1 == "get" ]
|
if [ $1 == "get" ]
|
||||||
then
|
then
|
||||||
if [ -f ${BASE}/${KEY} ]
|
if [ -f ${BASE}/${KEY} ]
|
||||||
@ -80,5 +85,5 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "usage: $0 [get|exists|watch|path] key\n"
|
printf "usage: $0 [get|exists|watch|path|dir] key\n"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user