#!/bin/sh # Copy the kit to the router's /etc/nikki/kit, then run the installer there: # tools/push.sh root@192.168.32.1 # ssh root@192.168.32.1 sh /etc/nikki/kit/install.sh set -eu host=${1:?usage: tools/push.sh root@} cd "$(dirname "$0")/.." # ustar without macOS metadata: busybox tar on OpenWrt chokes on pax/xattr headers COPYFILE_DISABLE=1 tar --no-xattrs --format ustar -czf - install.sh templates presets router luci | ssh "$host" 'mkdir -p /etc/nikki/kit && tar xzf - -C /etc/nikki/kit && chmod +x /etc/nikki/kit/router/*.sh' ver="$(git describe --always --dirty 2>/dev/null || echo '?') push $(date '+%Y-%m-%d %H:%M')" ssh "$host" "echo '$ver' > /etc/nikki/kit/VERSION" echo "pushed to $host:/etc/nikki/kit — now: ssh $host sh /etc/nikki/kit/install.sh"