Something
public text v1 · immutable#!/bin/sh -
swap_mount=$HOME/opennms/trunk
directories="workspace opennms"
zfs_fs=nerdy/eclipse
local_mountpoint="`/usr/sbin/zfs get -H -o value mountpoint $zfs_fs`"
if [ $? -ne 0 ]; then
echo "$0: could not get mount point for $zfs_fs" >&2
exit 1
fi
for directory in $directories; do
echo "---> Starting $directory"
rsync -av --delete $swap_mount/$directory/ $local_mountpoint/$directory/ \
|| exit 1
done
sudo snapshot $zfs_fs