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