Serenity Operating System
at portability 37 lines 818 B view raw
1#!/bin/sh 2set -e 3 4script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) 5cd "$script_path" 6 7fast_mode= 8while [ "$1" != "" ]; do 9 case $1 in 10 -f | --fast ) fast_mode=1 11 ;; 12 -h | --help ) printf -- "-f or --fast: build fast without cleaning or running tests\n" 13 exit 0 14 ;; 15 esac 16 shift 17done 18 19sudo id 20 21MAKE="make" 22 23if [ "$(uname -s)" = "OpenBSD" ]; then 24 MAKE="gmake" 25fi 26 27if [ "$fast_mode" = "1" ]; then 28 $MAKE -C ../ && \ 29 $MAKE -C ../ install && 30 sudo -E PATH="$PATH" ./build-image-qemu.sh 31else 32 $MAKE -C ../ clean && \ 33 $MAKE -C ../ && \ 34 $MAKE -C ../ test && \ 35 $MAKE -C ../ install && 36 sudo -E PATH="$PATH" ./build-image-qemu.sh 37fi