#!/bin/sh
# Run a built binary from the checkout, or fall back to cargo.
set -e
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
for candidate in \
  "$ROOT/target/release/dsh-desktop" \
  "$ROOT/target/debug/dsh-desktop"
do
  if [ -x "$candidate" ]; then
    exec "$candidate" "$@"
  fi
done
exec cargo run --manifest-path "$ROOT/Cargo.toml" -p dsh-desktop -- "$@"
