]> wirehaze git hosting - BOS.git/blobdiff - scripts/mac-install.sh

wirehaze git hosting

Start of cleanup.
[BOS.git] / scripts / mac-install.sh
similarity index 75%
rename from mac-install.sh
rename to scripts/mac-install.sh
index 18b1cc6e67257d61b8684c2f99ef8b014a4c2d7c..2a6625ec0f9e75eb9420c027e6fb117731ce3cd1 100755 (executable)
@@ -25,18 +25,18 @@ if [ -z "$1" ]; then
 fi
 
 echo "Compiling BOS..."
-./utils/osxfasm kernel/kernel.asm kernel/kernel.sys
-./utils/osxfasm boot/BOS_boot.asm boot/BOS_boot.bin
+../utils/osxfasm ../kernel/kernel.asm ../kernel/kernel.sys
+../utils/osxfasm ../boot/BOS_boot.asm ../boot/BOS_boot.bin
 
 if [ "$1" = "floppy" ]; then
     echo "Starting floppy installation..."
 
     #Install BOS_boot.bin as bootsector into bos.img
-    dd if=boot/BOS_boot.bin of=/dev/fd0 bs=1 count=512
+    dd if=../boot/BOS_boot.bin of=/dev/fd0 bs=1 count=512
     mount /mnt/floppy
 
     #Insert kernel.sys into image
-    cp kernel/kernel.sys /mnt/floppy
+    cp ../kernel/kernel.sys /mnt/floppy
 
     #Umount & cleanup
     umount /mnt/floppy
@@ -47,24 +47,24 @@ else
     echo "Starting image creation..."
 
     #Create image
-    rm -rf ./bos.img
-    mformat -C -f 1440 -v BOS -i bos.img ::
+    rm -rf ../bos.img
+    mformat -C -f 1440 -v BOS -i ../bos.img ::
 
     #Erhm, it isn't pretty....
-    DISKNAME=`hdiutil attach -nomount bos.img`
+    DISKNAME=`hdiutil attach -nomount ../bos.img`
     diskutil mount $DISKNAME
     MOUNTNAME=`diskutil info $DISKNAME | grep 'Mount Point' | cut -d : -f 2 | sed 's/^ *//g' | sed 's/ *$//g';`
 
     #Mounted, copy kernel.sys
-    cp kernel/kernel.sys $MOUNTNAME
+    cp ../kernel/kernel.sys $MOUNTNAME
 
     #Install BOS_boot.bin as bootsector into bos.img
     umount $DISKNAME
-    dd if=boot/BOS_boot.bin of=$DISKNAME bs=1 count=512
+    dd if=../boot/BOS_boot.bin of=$DISKNAME bs=1 count=512
 
     #Detach
     hdiutil detach $DISKNAME
-    chmod 0777 bos.img
+    chmod 0777 ../bos.img
 
     echo "BOS image created!"
 fi
\ No newline at end of file