131eb0c3b3
The zk-shell binary/library can save us from having to do alot here so just use it and remove some code. Change-Id: I07bde4dea61a125f7368349517e9878c2ee25608
16 lines
371 B
Bash
Executable File
16 lines
371 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This requires https://pypi.python.org/pypi/zk_shell/ to be installed...
|
|
|
|
set -e
|
|
|
|
ZK_HOSTS=${ZK_HOSTS:-localhost:2181}
|
|
TF_PATH=${TF_PATH:-taskflow}
|
|
|
|
for path in `zk-shell --run-once "ls" $ZK_HOSTS`; do
|
|
if [[ $path == ${TF_PATH}* ]]; then
|
|
echo "Removing (recursively) path \"$path\""
|
|
zk-shell --run-once "rmr $path" $ZK_HOSTS
|
|
fi
|
|
done
|