Skip to content

Commit

Permalink
Improve build script
Browse files Browse the repository at this point in the history
  • Loading branch information
mxlgv committed Sep 14, 2022
1 parent 639e4d8 commit 1061653
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
rm vbox.sys
#!/bin/bash

set -e

IMG=kolibri.img
DRV=vbox.sys

check_utils()
{
printf "%s: " $1
if command -v $1 &> /dev/null
then
echo -e "ok\r"
else
echo -e "no\r"
fi
}

check_utils fasm
check_utils kpack
check_utils mcopy

if [ ! -e "$IMG" ]; then
echo "File $IMG does not exist"
exit
fi

fasm vbox.asm
mcopy -D o -i kolibri.img vbox.sys ::drivers/vbox.sys
kpack /nologo /driver $DRV
mcopy -D o -i $IMG $DRV ::drivers/$DRV

echo -e "Done.\r"

0 comments on commit 1061653

Please sign in to comment.