Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Nov 26, 2016
1 parent 9a2f006 commit 6089c74
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
58 changes: 58 additions & 0 deletions fmt/buildall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash
#
# Unlike the DOS batch files, this script is much more powerful.
# In fact, this script BUILDs the DOS batch files.
#
# NTS: Make sure your editor uses unix LF endings in the file,
# but keeps the CR LF DOS endings for the DOS batch files.

cat >buildall.bat <<_EOF
@echo off
set WHAT=make
if "%1" == "clean" set WHAT=clean
_EOF
cat >clean.bat <<_EOF
@echo off
if exist *.map del *.map
if exist *.obj del *.obj
if exist *.sym del *.sym
if exist *.exe del *.exe
_EOF
for i in *; do if [ -d "$i" ]; then
(cd $i && (
cp -vu ../buildall.sh buildall.sh || exit 1

if [ -x buildall.sh ]; then
echo Building: $i
./buildall.sh $* || exit 1

cat >>../buildall.bat <<_EOF
echo Building: $i
cd $i
call buildall.bat %WHAT%
cd ..
_EOF
fi

if [ -x make.sh ]; then
./make.sh $* || exit 1

echo Building: $i
cat >>../buildall.bat <<_EOF
echo Building: $i
cd $i
call make.bat %WHAT%
cd ..
_EOF
fi)
) || exit 1
fi; done

cat >>buildall.bat <<_EOF
echo All done
_EOF

58 changes: 58 additions & 0 deletions fmt/omf/linux-host/buildall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash
#
# Unlike the DOS batch files, this script is much more powerful.
# In fact, this script BUILDs the DOS batch files.
#
# NTS: Make sure your editor uses unix LF endings in the file,
# but keeps the CR LF DOS endings for the DOS batch files.

cat >buildall.bat <<_EOF
@echo off
set WHAT=make
if "%1" == "clean" set WHAT=clean
_EOF
cat >clean.bat <<_EOF
@echo off
if exist *.map del *.map
if exist *.obj del *.obj
if exist *.sym del *.sym
if exist *.exe del *.exe
_EOF
for i in *; do if [ -d "$i" ]; then
(cd $i && (
cp -vu ../buildall.sh buildall.sh || exit 1

if [ -x buildall.sh ]; then
echo Building: $i
./buildall.sh $* || exit 1

cat >>../buildall.bat <<_EOF
echo Building: $i
cd $i
call buildall.bat %WHAT%
cd ..
_EOF
fi

if [ -x make.sh ]; then
./make.sh $* || exit 1

echo Building: $i
cat >>../buildall.bat <<_EOF
echo Building: $i
cd $i
call make.bat %WHAT%
cd ..
_EOF
fi)
) || exit 1
fi; done

cat >>buildall.bat <<_EOF
echo All done
_EOF

0 comments on commit 6089c74

Please sign in to comment.