summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
ca75cd8)
VPP requires bash for all shell scripts. Align shebang lines in build
and test scripts to look up the location of bash rather than hard coding
'/bin/bash'.
Look up the location of bash for makefiles.
Type: improvement
Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24
Signed-off-by: Tom Jones <thj@freebsd.org>
19 files changed:
export WS_ROOT=$(CURDIR)
export BR=$(WS_ROOT)/build-root
CCACHE_DIR?=$(BR)/.ccache
export WS_ROOT=$(CURDIR)
export BR=$(WS_ROOT)/build-root
CCACHE_DIR?=$(BR)/.ccache
+SHELL:=$(shell which bash)
GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
######################################################################
# Scripts require non-POSIX parts of bash
######################################################################
# Scripts require non-POSIX parts of bash
+SHELL := $(shell which bash)
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
- fakeroot /bin/bash -c "{ \
+ fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
- fakeroot /bin/bash -c "{ \
+ fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# limitations under the License.
# Scripts require non-POSIX parts of bash
# limitations under the License.
# Scripts require non-POSIX parts of bash
+SHELL := $(shell which bash)
DL_CACHE_DIR = $(HOME)/Downloads
MAKE ?= make
DL_CACHE_DIR = $(HOME)/Downloads
MAKE ?= make
# Get Command Line arguements if present
VPP_DIR=$1
# Get Command Line arguements if present
VPP_DIR=$1
# Capture all the interface IPs, in case we need them later
ip -o addr show > ~vagrant/ifconfiga
# Capture all the interface IPs, in case we need them later
ip -o addr show > ~vagrant/ifconfiga
# Get Command Line arguements if present
VPP_DIR=$1
# Get Command Line arguements if present
VPP_DIR=$1
# Figure out what system we are running on
if [ "$(uname)" <> "Darwin" ] ; then
# Figure out what system we are running on
if [ "$(uname)" <> "Darwin" ] ; then
# Make sure that we get the hugepages we need on provision boot
# Note: The package install should take care of this at the end
# Make sure that we get the hugepages we need on provision boot
# Note: The package install should take care of this at the end
if [ -n "$1" ]; then
VPP_DIR=$1
if [ -n "$1" ]; then
VPP_DIR=$1
: ${VPP_BUILD_USER:=$(whoami)}
: ${VPP_BUILD_HOST:=$(hostname)}
DATE_FMT="+%Y-%m-%dT%H:%M:%S"
: ${VPP_BUILD_USER:=$(whoami)}
: ${VPP_BUILD_HOST:=$(hostname)}
DATE_FMT="+%Y-%m-%dT%H:%M:%S"
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# to obtain dhcp address from leftpeer
dhclient -d -v eth1
# to obtain dhcp address from leftpeer
dhclient -d -v eth1
if [ "$(ls -A ${FAILED_DIR})" ]
then
if [ "$(ls -A ${FAILED_DIR})" ]
then
cmd=$1
force_foreground=$2
cmd=$1
force_foreground=$2
#
# socket_test.sh -- script to run socket tests.
#
#
# socket_test.sh -- script to run socket tests.
#
function usage() {
echo "$0" 1>&2
function usage() {
echo "$0" 1>&2