devstack/lib/neutron_thirdparty/ryu
Sean Dague e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00

29 lines
659 B
Bash

#!/bin/bash
#
# Ryu SDN Framework
# -----------------
# Used by ofagent.
# TODO(yamamoto): Switch to pip_install once the development was settled
# Save trace setting
RYU3_XTRACE=$(set +o | grep xtrace)
set +o xtrace
RYU_DIR=$DEST/ryu
# Make this function idempotent and avoid cloning same repo many times
# with RECLONE=yes
_RYU_INSTALLED=${_RYU_INSTALLED:-False}
function install_ryu {
if [[ "$_RYU_INSTALLED" == "False" ]]; then
git_clone $RYU_REPO $RYU_DIR $RYU_BRANCH
export PYTHONPATH=$RYU_DIR:$PYTHONPATH
pip_install $(cat $RYU_DIR/tools/pip-requires)
_RYU_INSTALLED=True
fi
}
# Restore xtrace
$RYU3_XTRACE