Makefile.private: correct the names of prerelease tarballs
[syslinux/sherbszt.git] / tests / build-pxelinux
blob50c9de8c067aff0049d5f2f90fa8bd49d0b71760
1 #!/bin/bash
3 # Copyright (C) 2013 Intel Corporation; author Matt Fleming
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 # Boston MA 02111-1307, USA; either version 2 of the License, or
9 # (at your option) any later version; incorporated herein by reference.
12 usage()
14 echo "Usage: " $0 "[start|stop] <srcdir> <config>" > /dev/stderr
17 if [ $# -lt 3 ]; then
18 usage
19 exit 1
22 start_func()
24 tmpdir=`mktemp -d || exit 1`
25 echo $tmpdir
27 mkdir -p $tmpdir/tftpboot/pxelinux.cfg
28 cp $2 $tmpdir/tftpboot/pxelinux.cfg/default
30 # This doesn't work if we built with O=/tmp/foobar
31 #make -p -s -C $1 bios netinstall INSTALLROOT=$tmpdir > /dev/stderr
32 for f in `find $1/bios -name "*.c32" -o -name "*.0"`; do
33 cp $f $tmpdir/tftpboot/
34 done
37 stop_func()
39 rm -fr $1
42 case "$1" in
43 start)
44 shift
45 start_func $*
47 stop)
48 shift
49 stop_func $*
51 esac