#!/bin/sh
# Runs a shell binary: the installed sf-shell package if there is one, else
# the factory copy in /usr/bin (sf-update, docs/updates.md).
#   sf-shell-exec sf-remote --home-socket ...
name=$1
shift
pkg=/var/lib/sf-pkg/sf-shell/current/bin/$name
[ -x "$pkg" ] && exec "$pkg" "$@"
exec "/usr/bin/$name" "$@"
