DEST="$2"
if [ -z "$ORIG" ]; then
- echo "usage $BASENAME rsync_to $GUEST <orig> [dest]"
+ echo "usage $BASENAME rsync_to $VM <orig> [dest]"
exit 1
fi
DEST="$2"
if [ -z "$ORIG" ]; then
- echo "usage $BASENAME rsync_from $GUEST <orig> [dest]"
+ echo "usage $BASENAME rsync_from $VM <orig> [dest]"
exit 1
fi
# Syntax check
if [ -z "$command" ]; then
- echo "usage $BASENAME inotify $GUEST <watched> <command>"
+ echo "usage $BASENAME inotify $VM <watched> <command>"
echo "example: kvmx inotify $guest hostfolder make -C guestfolder compile"
exit 1
fi
done
fi
+ # Inform user what's about to happen
+ echo "Watching $watched on guest \"$VM\" to exec \"$command\" upon changes..."
+
# Dispatch
while inotifywait $args -r $watched; do
echo "$command" | kvmx_ssh