X-Git-Url: https://git.wirehaze.ovh/BOS.git/blobdiff_plain/2c5764025542375cf66d6eb178fd9468b9022726:/mac-install.sh..e7307fb715b46f4ac09ae7781fad9dbefa1090a7:/scripts/mac-install.sh diff --git a/mac-install.sh b/scripts/mac-install.sh similarity index 75% rename from mac-install.sh rename to scripts/mac-install.sh index 18b1cc6..2a6625e 100755 --- a/mac-install.sh +++ b/scripts/mac-install.sh @@ -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