diff --git a/scripts/copy-wildcard.sh b/scripts/copy-wildcard.sh new file mode 100755 index 0000000..fc4a2c4 --- /dev/null +++ b/scripts/copy-wildcard.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# example: ./copy-wildcard.sh http://src:12380 http://dest:12380 /path/* + +if [ $# != 3 ] ; then + echo "usage: $0 src-url dest-url path-wildcard" + exit 1 +fi + +set -e +nilmtool -u "$1" list "$3" | sort | while read path layout; do + nilm-copy -u "$1" -U "$2" "$path" "$path" +done