]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/tools/nanobsd/rescue/build.sh
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302069, and update
[FreeBSD/FreeBSD.git] / tools / tools / nanobsd / rescue / build.sh
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 today=`date '+%Y%m%d'`
7
8 if [ -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
15 fi
16
17 CFG="${1}"
18 shift;
19
20 if [ \! -d /usr/obj/Rescue ]; then
21   mkdir -p /usr/obj/Rescue
22 fi
23
24 sh ../nanobsd.sh $* -c ${CFG}
25
26 if [ \! -d /usr/obj/Rescue ]; then
27   mkdir -p /usr/obj/Rescue
28 fi
29 F32="/usr/obj/Rescue/rescue_${today}_x32"
30 D32="/usr/obj/nanobsd.rescue_i386"
31 if [ -f "${D32}/_.disk.full" ]; then
32   cp "${D32}/_.disk.full" "${F32}.img"
33 fi
34 if [ -f "${D32}/_.disk.iso" ]; then
35   cp "${D32}/_.disk.iso" "${F32}.iso"
36 fi
37
38 F64="/usr/obj/Rescue/rescue_${today}_x64"
39 D64="/usr/obj/nanobsd.rescue_amd64"
40 if [ -f "${D64}/_.disk.full" ]; then
41   cp "${D64}/_.disk.full" "${F64}.img"
42 fi
43 if [ -f "${D64}/_.disk.iso" ]; then
44   cp "${D64}/_.disk.iso" "${F64}.iso"
45 fi