#!/bin/sh

if [ -z $1 ]; then
  example=dumpinfo
else
  example=$1
fi

if [[ $(uname) == "MINGW64_NT"* ]]; then
  features="windows"
else
  features="x11"
fi

if [[ $1 == "demo" ]]; then
  features="$features demo"
fi

RUST_BACKTRACE=1 cargo run --example $example --features="$features" "${@:2}"

exit
