summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rwxr-xr-xkernel/build.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/build.sh b/kernel/build.sh
index 9d48229..a128366 100755
--- a/kernel/build.sh
+++ b/kernel/build.sh
@@ -1,4 +1,5 @@
#! /usr/bin/env bash
+set -e
ASM_PATH="src/"
TARGET_PATH="target"
@@ -20,12 +21,12 @@ cleanup_target() {
}
create_target() {
- mkdir $TARGET_PATH &> /dev/null
- mkdir $TMP_PATH &> /dev/null
+ mkdir -p $TARGET_PATH
+ mkdir -p $TMP_PATH
}
cleanup_temp() {
- rm -f $TMP_PATH/* &> /dev/null
+ rm -r $TMP_PATH/* &>/dev/null ||:
}
# ---------------------------------------------------
@@ -44,9 +45,7 @@ build_kernel_iso() {
build_kernel_elf
fi
create_target
- mkdir $TMP_PATH/isofiles &> /dev/null
- mkdir $TMP_PATH/isofiles/boot &> /dev/null
- mkdir $TMP_PATH/isofiles/boot/grub &> /dev/null
+ mkdir -p $TMP_PATH/isofiles/boot/grub
cp $TARGET_PATH/kernel.bin $TMP_PATH/isofiles/boot &> /dev/null
cp $GRUB_CFG_PATH $TMP_PATH/isofiles/boot/grub/grub.cfg &> /dev/null
[ -d "$GRUB_i386" ] || { echo "Grub img $GRUB_i386 does not exist!"; exit 1; }