Browse Source

Sample script for copying wildcard paths between hosts

tags/nilmtools-0.5^0
Jim Paris 11 years ago
parent
commit
320c32cfdc
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      scripts/copy-wildcard.sh

+ 13
- 0
scripts/copy-wildcard.sh View File

@@ -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

Loading…
Cancel
Save