#!/bin/bash # Script details SCRIPTNAME=`basename $0` SCRIPT=$0 SCRIPT_ARGS=${@} # Initialize some of the variables if [ "$RIFT_LP_ADDR" = "" ]; then RIFT_LP_ADDR="localhost" fi PKGS=() INSTANTIATE=0 DESC_ID="" NS_NAME="" LOGGING=0 RIFT_LP_PKG_UPLOAD_URL="https://${RIFT_LP_ADDR}:4567/api/upload" ###################################################################### # Function:usage # # Prints usage # ###################################################################### function usage() { cat < ) and stderr to file # and store the STDOUT and STDERR for later use exec 3>&1 exec 4>&2 exec >$LOGFILE exec 2>&1 fi echo "Started at $DATE" # Iterate through the packages and upload them for PKG in "${PKGS[@]}" do echo "Uploading package $PKG" upload_package $PKG echo "" done if [ "${INSTANTIATE}" -eq 1 ]; then instantiate_ns $DESC_ID fi echo "Ended at $DATE"