2021-01-04 20:53:21 +01:00
|
|
|
#!/bin/bash
|
2017-04-25 14:41:48 +02:00
|
|
|
#
|
|
|
|
|
# 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
|
2020-10-05 07:51:37 +02:00
|
|
|
TCL_REL_OR_ABS=TCL_DIR_REL_OR_ABS
|
|
|
|
|
if [ "${TCL_REL_OR_ABS:0:1}" = "/" ]; then
|
2021-01-04 15:47:03 +01:00
|
|
|
TCL_DIR=$TCL_REL_OR_ABS
|
2020-10-05 07:51:37 +02:00
|
|
|
else
|
2021-01-05 15:30:05 +01:00
|
|
|
TCL_DIR=$(cd $(dirname ${BASH_SOURCE[0]})/$TCL_REL_OR_ABS; pwd -P)
|
2020-10-05 07:51:37 +02:00
|
|
|
fi
|
2017-04-25 14:41:48 +02:00
|
|
|
#
|
2020-10-05 07:51:37 +02:00
|
|
|
eval ${TCL_DIR}/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
|
2017-04-25 14:41:48 +02:00
|
|
|
drc off
|
|
|
|
|
box 0 0 0 0
|
|
|
|
|
ext2spice $esargs
|
|
|
|
|
quit -noprompt
|
|
|
|
|
EOF
|