#! /bin/bash PROJECT=update # Available sub-projects. AVAILABLE_PROJECTS=( update ) # Enabled sub-projects. PROJECTS=( update ) # Additional options (see functions sources below). # Options followed by a ':' require an argument, by '::' allow an optional argument. SHORT_OPTIONS= # Long options are not available with BSD getopt. LONG_OPTIONS= # Help for additional options usage() { # option h "help" "display this help and exit" return } # Find the directory containing this script. source="${BASH_SOURCE[0]}" while [ -h "${source}" ] ; do SCRIPTS="$(cd -P "$(dirname "${source}")" && pwd)" source="$(readlink "${source}")" [[ ${source} != /* ]] && source="$DIR/${source}" done SCRIPTS="$(cd -P "$(dirname "${source}")" && pwd)" check_target() { echo "" } get_targets() { echo $(cd ${SCRIPTS}; echo build-* | sed -e 's/build-//g') } # Get support functions and definitions. source ${SCRIPTS}/support if [ "${TARGET}" != "" -a "${TARGET}" != "all" ] ; then # Update a single package. run ${SCRIPTS}/build-${TARGET} -cupP elif [ "${TARGET}" = "all" ] ; then # Update all known packages. for package in ${TARGETS} ; do run ${SCRIPTS}/build-${package} -cupP done fi