63 lines
1.7 KiB
Bash
63 lines
1.7 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Simple wrapper for dosemu to run easyabel
|
|
# Copyright (C) 2007 Clifford Wolf <clifford@clifford.at>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Install EASYABEL in C:\DATAIO in dosemu first.
|
|
# (this is the default install directory btw)
|
|
#
|
|
|
|
set -- "${1%.abl}"
|
|
|
|
if [ ! -f "$1.abl" ]; then
|
|
echo "Usage: $0 project[.abl]" >&2
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf $HOME/.dosemu/drive_c/EASYABEL.WRP
|
|
mkdir -p $HOME/.dosemu/drive_c/EASYABEL.WRP
|
|
|
|
cp $1.abl $HOME/.dosemu/drive_c/EASYABEL.WRP/$1.abl
|
|
cat > $HOME/.dosemu/drive_c/EASYABEL.WRP/$1.bat << EOT
|
|
SET ABLPROJECT=$1
|
|
SET ABEL4DEV=C:\DATAIO\LIB4
|
|
SET ABEL4DB=C:\DATAIO\LIB4\DEVICES
|
|
SET DB_DICT=C:\DATAIO\LIB4\DBASE
|
|
PATH C:\DATAIO;%PATH%
|
|
C:
|
|
CD \EASYABEL.WRP
|
|
AHDL2PLA %ABLPROJECT%.ABL
|
|
IF NOT EXIST %ABLPROJECT%.TT1 EXITEMU
|
|
IF NOT EXIST %ABLPROJECT%.TMV EXITEMU
|
|
PLASIM %ABLPROJECT%.TT1
|
|
IF NOT EXIST %ABLPROJECT%.SM1 EXITEMU
|
|
PLAOPT %ABLPROJECT%.TT1
|
|
IF NOT EXIST %ABLPROJECT%.TT2 EXITEMU
|
|
PLASIM %ABLPROJECT%.TT2
|
|
IF NOT EXIST %ABLPROJECT%.SM2 EXITEMU
|
|
PLAOPT %ABLPROJECT%.TT2
|
|
IF NOT EXIST %ABLPROJECT%.TT3 EXITEMU
|
|
PLASIM %ABLPROJECT%.TT3
|
|
IF NOT EXIST %ABLPROJECT%.SM3 EXITEMU
|
|
FUSEASM %ABLPROJECT%.TT3
|
|
IF NOT EXIST %ABLPROJECT%.JED EXITEMU
|
|
IF NOT EXIST %ABLPROJECT%.DOC EXITEMU
|
|
JEDSIM %ABLPROJECT%.JED
|
|
IF NOT EXIST %ABLPROJECT%.SIM EXITEMU
|
|
EXITEMU
|
|
EOT
|
|
|
|
dosemu -dumb '\EASYABEL.WRP\'"$1.bat"
|
|
|
|
for ext in dmc jed tmv doc sm1 sm2 sm3 sim tt1 tt2 tt3; do
|
|
rm -f $1.$ext
|
|
if [ -f $HOME/.dosemu/drive_c/EASYABEL.WRP/$1.$ext ]; then
|
|
mv -v $HOME/.dosemu/drive_c/EASYABEL.WRP/$1.$ext .
|
|
fi
|
|
done
|