mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
add a find option to mobyconfig
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
32c895765f
commit
4993204e9d
@ -2,7 +2,7 @@
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
printf "usage: $0 [get|exists|watch|path|dir] key\n"
|
||||
printf "usage: $0 [get|exists|watch|path|dir|find] key\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -69,6 +69,18 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $1 == "find" ]
|
||||
then
|
||||
if [ -e ${BASE}/${KEY} ]
|
||||
then
|
||||
find ${BASE}/${KEY} -type f
|
||||
exit 0
|
||||
else
|
||||
printf "No such key: ${KEY}\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# might be nicer if watch returned a file descriptor not a path
|
||||
# /Database/branch/master/watch/com.docker.driver.amd64-linux.node/etc.node/docker.node/daemon.json.node/tree.live
|
||||
if [ $1 == "watch" ]
|
||||
@ -85,5 +97,5 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "usage: $0 [get|exists|watch|path|dir] key\n"
|
||||
printf "usage: $0 [get|exists|watch|path|dir|find] key\n"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user