build.sh revision 274561
1#!/bin/sh 2# 3# $FreeBSD: stable/10/tools/tools/nanobsd/rescue/build.sh 274561 2014-11-16 01:29:18Z imp $ 4# 5 6today=`date '+%Y%m%d'` 7 8if [ -z "${1}" -o \! -f "${1}" ]; then 9 echo "Usage: $0 cfg_file [-bhiknw]" 10 echo "-i : skip image build" 11 echo "-w : skip buildworld step" 12 echo "-k : skip buildkernel step" 13 echo "-b : skip buildworld and buildkernel step" 14 exit 15fi 16 17CFG="${1}" 18shift; 19 20if [ \! -d /usr/obj/Rescue ]; then 21 mkdir -p /usr/obj/Rescue 22fi 23 24sh ../nanobsd.sh $* -c ${CFG} 25 26F32="/usr/obj/Rescue/rescue_${today}_x32" 27D32="/usr/obj/nanobsd.rescue_i386" 28if [ -f "${D32}/_.disk.full" ]; then 29 mv "${D32}/_.disk.full" "${F32}.img" 30fi 31if [ -f "${D32}/_.disk.iso" ]; then 32 mv "${D32}/_.disk.iso" "${F32}.iso" 33fi 34 35F64="/usr/obj/Rescue/rescue_${today}_x64" 36D64="/usr/obj/nanobsd.rescue_amd64" 37if [ -f "${D64}/_.disk.full" ]; then 38 mv "${D64}/_.disk.full" "${F64}.img" 39fi 40if [ -f "${D64}/_.disk.iso" ]; then 41 mv "${D64}/_.disk.iso" "${F64}.iso" 42fi 43