flatcar-scripts/extlinux.sh
rspangler@google.com d74220d772 Start copying over source.
git-svn-id: svn://chrome-svn/chromeos/trunk@4 06c00378-0e64-4dae-be16-12b19f9950a1
2009-10-09 20:56:14 +00:00

33 lines
914 B
Bash
Executable File

#!/bin/bash
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Runs our own version of extlinux, which is in the third_party directory.
# Our version is quieter and faster. extlinux will be compiled if it's not
# already.
set -e
SCRIPTS_ROOT=`dirname "$0"`
THIRD_PARTY="${SCRIPTS_ROOT}/../third_party"
BUILD_ROOT=${BUILD_ROOT:-${SCRIPTS_ROOT}/../build}
EXTLINUX_BIN="$BUILD_ROOT"/x86/obj/src/third_party/syslinux/syslinux-*/extlinux/extlinux
echo bin is "$EXTLINUX_BIN"
if [ ! -e $EXTLINUX_BIN ]
then
# compile extlinux
(cd "$SCRIPTS_ROOT/../third_party/syslinux"/syslinux-*/ && make)
if [ ! -e $EXTLINUX_BIN ]
then
echo "Can't find or compile extlinux. Sorry."
exit 1
fi
fi
# we don't want ""s around $* b/c that will group all args into a single arg
$EXTLINUX_BIN $*