-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for automatically rebuilding disk image
Based on CommandLineCompiler
- Loading branch information
Showing
6 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- 1/Defragger.Mod.txt | ||
+++ 2/Defragger.Mod.txt | ||
@@ -1,5 +1,5 @@ | ||
MODULE Defragger; | ||
- IMPORT SYSTEM, Kernel, FileDir, DefragFiles, Display, Fonts; | ||
+ IMPORT SYSTEM, Kernel, FileDir, DefragFiles, Display, Fonts, CommandLineSystem; | ||
|
||
CONST FileInfoPerSector = 28; | ||
|
||
@@ -31,6 +31,7 @@ | ||
Display.ReplConst(Display.black, 22, 22, 166, 26, Display.replace); | ||
DrawText("Defrag finished. Please restart.", 30, 30); | ||
Kernel.Install(SYSTEM.ADR(ShowRestartMessage), 0); | ||
+ CommandLineSystem.FinishCommand; | ||
REPEAT SYSTEM.PUT(-64, Kernel.Time() + 1000) UNTIL FALSE | ||
END ShowRestartMessage; | ||
|
||
@@ -122,5 +123,9 @@ | ||
END; | ||
Trim; ShowRestartMessage | ||
END Defrag; | ||
+ | ||
+ PROCEDURE Load*; | ||
+ BEGIN | ||
+ END Load; | ||
|
||
END Defragger. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
for i in Display Viewers MenuViewers Rectangles Curves Draw MacroTool ORS PCLink1 ORTool; do | ||
cp ${WIRTH_PERSONAL:-../wirth-personal/}people.inf.ethz.ch/wirth/ProjectOberon/Sources/$i.Mod.txt work/$i.Mod | ||
dos2unix work/$i.Mod | ||
unix2mac work/$i.Mod | ||
done | ||
|
||
cd work | ||
sed 's/Modules.Load("System"/Modules.Load("CommandLineSystem"/' <Oberon.Mod.txt >OberonX.Mod.txt | ||
cp Defragger.Mod.txt Defragger0.Mod.txt | ||
patch <../CommandLineCompiler/CommandLineDefragger.patch | ||
mv Defragger.Mod.txt DefraggerX.Mod.txt | ||
mv Defragger0.Mod.txt Defragger.Mod.txt | ||
for i in *.txt; do unix2mac $i; mv $i ${i%.txt}; done | ||
|
||
unzip ../CommandLineCompiler.zip | ||
gcc main.c disk.c risc.c risc-fp.c -o risc | ||
|
||
cp base.dsk mods.dsk | ||
: >.cmds | ||
for i in *.Mod *.Text *.Tool; do echo +$i >> .cmds; done | ||
./risc mods.dsk < .cmds | ||
cp ../BuildModifications.Tool.txt .cmds | ||
echo 'ORP.Compile CommandLineSystem.Mod OberonX.Mod ~' >> .cmds | ||
./risc mods.dsk < .cmds | ||
echo 'ORP.Compile DefraggerX.Mod/s ~' > .cmds | ||
echo 'System.DeleteFiles OberonX.Mod DefraggerX.Mod ~' >> .cmds | ||
echo 'Defragger.Load' >> .cmds | ||
echo 'ORP.Compile Oberon.Mod Defragger.Mod/s ~' >> .cmds | ||
echo 'Defragger.Defrag' >> .cmds | ||
./risc mods.dsk < .cmds | ||
../DefragmentFreeSpace/trim_defragmented_image.sh mods.dsk | ||
mv mods.dsk_trimmed OberonModifications.dsk | ||
cd .. | ||
|
||
echo Done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters