magic/tcltk/ext2spice.sh.in

30 lines
610 B
Bash
Raw Normal View History

#!/bin/bash
#
# Standalone script for ext2spice, for Tcl-based magic 8.0
#
# Parse arguments. "--" separates arguments to magic
# from arguments to ext2spice.
#
mgargs=""
esargs=""
for i in $@; do
case $i in
--) mgargs="$esargs"
esargs="" ;;
*) esargs="$esargs $i" ;;
esac
done
TCL_REL_OR_ABS=TCL_DIR_REL_OR_ABS
if [ "${TCL_REL_OR_ABS:0:1}" = "/" ]; then
TCL_DIR=$TCL_REL_OR_ABS
else
TCL_DIR=$(cd $(dirname ${BASH_SOURCE[0]})/$TCL_REL_OR_ABS; pwd -P)
fi
#
eval ${TCL_DIR}/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
drc off
box 0 0 0 0
ext2spice $esargs
quit -noprompt
EOF