#!/bin/sh
set -eu
root=${INKHUB_REMARKABLE_ROOT:-/home/root/inkhub-dev}
export LIBRA2_SYNC_LAYOUT="$root/sync.conf"
export LIBRA2_SYNC_CURL="$root/bin/curl"
export LIBRA2_SYNC_ACCOUNT="${LIBRA2_SYNC_ACCOUNT:-$root/preferences/sync/sync.conf}"
export LIBRA2_SYNC_RESOLVE="$root/bin/remarkable-resolve"
export LIBRA2_SYNC_NAME_FILE="$root/device-name"
export LIBRA2_SYNC_RUN_DIR="$root/run"
exec "$root/bin/libra2-sync" "$@"
