Files
magic/tcltk/ext2sim.sh.in
T
Tim Edwards c0867ef71e Reverted about half of pull request #41 because it breaks compatibility
with qflow, which wants to launch applications from symbolic links.
The portability of magic now depends only on setting environment
variable CAD_ROOT, but the portability should still be ensured.
2021-02-02 10:19:04 -05:00

28 lines
531 B
Bash
Executable File

#!/bin/bash
#
# Standalone script for ext2sim, for Tcl-based magic 8.0
#
# Parse arguments. "--" separates arguments to magic
# from arguments to ext2sim.
#
mgargs=""
esargs=""
for i in $@; do
case $i in
--) mgargs="$esargs"
esargs="" ;;
*) esargs="$esargs $i" ;;
esac
done
TCL_MAG_DIR=${CAD_ROOT}/magic/tcl
if [ "${TCL_MAG_DIR}" = "/magic/tcl" ]; then
TCL_MAG_DIR=TCL_DIR
fi
#
eval ${TCL_MAG_DIR}/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
drc off
box 0 0 0 0
ext2sim $esargs
quit -noprompt
EOF