Signed-off-by: Alejandro Mery <amery@geeks.cl>
@ -2,9 +2,7 @@
set -e
cd "$(dirname "$0")"
DIR="$PWD"
cd "files"
find ! -type d -exec "$DIR/sync2.sh" '{}' \;
find -H files -print0 | xargs -r0 "$PWD/sync2.sh" -d "files"
exec "$DIR/sync_ssh.sh"
exec "$PWD/sync_ssh.sh"
@ -5,12 +5,23 @@ err() { echo "E: $$: $*" >&2; }
set -u
FILES="$(pwd -P)"
if [ "x-d" = "x${1:-}" ]; then
BASE="$2"
shift 2
else
BASE=.
fi
FILES="$(readlink -f "$BASE")"
for x; do
# clean
#
x="${x#./}"
case "$x" in
"$BASE") continue ;;
"$BASE"/*) x="${x#$BASE/}" ;;
./*) x="${x#./}" ;;
esac
# find target (d1)