#!/bin/bash
################################################################################
# NAME     : run_ngspice
# PURPOSE  : NGspice wrapper script
# AUTHOR   : Richard Booth
# DATE     : Sat Nov  9 11:11:02 2013
# -----------------------------------------------------------------------------
# NOTES    : 
################################################################################
ngspice=/opt/local/bin/ngspice
project=generic
quiet=0
arglist=""
while [ $# -gt 0 ]; do
    arg=$1; shift 1
    case $arg in
        -project) project=$1; shift 1;;
        -quiet)   quiet=1;;
        -verbose) quiet=0;;
        *) arglist="$arglist $arg";;
    esac
done
if [ $quiet = 1 ]; then
    nohup nice $ngspice $arglist > /dev/null
else
    nice $ngspice $arglist
fi
