Skip to content

Instantly share code, notes, and snippets.

@koivunej
Last active September 9, 2016 05:16
Show Gist options
  • Save koivunej/9fab1ab16a3494bc41a4303b69be4b14 to your computer and use it in GitHub Desktop.
Save koivunej/9fab1ab16a3494bc41a4303b69be4b14 to your computer and use it in GitHub Desktop.
run.sh for ASSET model checker.
#!/bin/bash
set -eu
[ "${1:-}" ] && [ -f "${1:-}" ] || { echo "No such file: ${1:-}" >&2; exit 1; }
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[ -f "$DIR/asset.cc" ] || { echo "asset.cc not found in: $DIR (where run.sh is)" >&2; exit 1; }
cp "$1" asset.model
g++ -ansi -Wall -pedantic -O2 asset.cc -o asset.out
time ./asset.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment