#!/bin/sh
# Deprecated name: `swarmcode` is now `ncode`. Every argument passes through
# unchanged; the note goes to stderr only when stderr is a terminal, so
# scripts that read `-p --json` output never see it.
set -eu

self="$0"
if resolved=$(readlink -f -- "$self" 2>/dev/null) && [ -n "$resolved" ]; then
  self="$resolved"
fi
root=$(CDPATH= cd -- "$(dirname -- "$self")/.." && pwd)

if [ -t 2 ]; then
  echo "swarmcode is now ncode; this alias will be removed in a later release." >&2
fi
exec "$root/bin/ncode" "$@"
