up through 8.40
parent
d0c228be5f
commit
eb6f5acfd5
|
@ -0,0 +1,212 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="bash"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="5.2.15"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--without-bash-malloc \
|
||||||
|
--with-installed-readline \
|
||||||
|
--docdir=/usr/share/doc/${APPNAME}-${VERSION}
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# TODO needs a separate build test as tester user
|
||||||
|
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,211 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="bison"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="3.8.2"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--docdir=/usr/share/doc/${APPNAME}-${VERSION}
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,216 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="expat"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="2.5.0"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--docdir=/usr/share/doc/${APPNAME}-${VERSION}
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Post-install cleanup"
|
||||||
|
install -v -m644 doc/*.{html,css} /usr/share/doc/${APPNAME}-${VERSION}
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,212 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="gdbm"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="1.23"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
CC=gcc ./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--enable-libgdbm-compat
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,211 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="gperf"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="3.1"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--docdir=/usr/share/doc/${APPNAME}-${VERSION}
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make -j1 check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,213 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="grep"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="3.8"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Prework to cut out some egrep|fgrep tests"
|
||||||
|
sed -i "s/echo/#echo/" src/egrep.sh
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure --prefix=/usr
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,224 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="inetutils"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="2.4"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--bindir=/usr/bin \
|
||||||
|
--localstatedir=/var \
|
||||||
|
--disable-logger \
|
||||||
|
--disable-whois \
|
||||||
|
--disable-rcp \
|
||||||
|
--disable-rexec \
|
||||||
|
--disable-rlogin \
|
||||||
|
--disable-rsh \
|
||||||
|
--disable-servers
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# TODO remove the "cute" from this syntax
|
||||||
|
logprint "Moving binary..."
|
||||||
|
mv -v /usr/{,s}bin/ifconfig
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,207 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="less"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="608"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--sysconfdir=/etc
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -0,0 +1,213 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# desc:
|
||||||
|
# stages, builds, installs
|
||||||
|
|
||||||
|
# make variables persist in subprocesses for logging function
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Configuration:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# the name of this application
|
||||||
|
APPNAME="libtool"
|
||||||
|
|
||||||
|
# the version of this application
|
||||||
|
VERSION="2.4.7"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Variables and functions sourced from Environment:
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# assert_zero()
|
||||||
|
# Checks if $1 is 0. If non-0 value, halts the execution of the script.
|
||||||
|
#
|
||||||
|
# LOGS_ROOT
|
||||||
|
# The parent directory where logs from this project will go.
|
||||||
|
#
|
||||||
|
# TEMP_STAGE_DIR
|
||||||
|
# The parent directory of where source archives are extracted to.
|
||||||
|
|
||||||
|
# register mode selections
|
||||||
|
ARGUMENT_LIST=(
|
||||||
|
"stage"
|
||||||
|
"build"
|
||||||
|
"install"
|
||||||
|
"all"
|
||||||
|
"help"
|
||||||
|
)
|
||||||
|
|
||||||
|
# modes to associate with switches
|
||||||
|
# assumes you want nothing done unless you ask for it.
|
||||||
|
MODE_STAGE=false
|
||||||
|
MODE_BUILD=false
|
||||||
|
MODE_INSTALL=false
|
||||||
|
MODE_ALL=false
|
||||||
|
MODE_HELP=false
|
||||||
|
|
||||||
|
# the file to log to
|
||||||
|
LOGFILE="${APPNAME}.log"
|
||||||
|
|
||||||
|
# ISO 8601 variation
|
||||||
|
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
|
||||||
|
|
||||||
|
# the path where logs are written to
|
||||||
|
# note: LOGS_ROOT is sourced from environment
|
||||||
|
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
|
||||||
|
|
||||||
|
# the path where the source will be located when complete
|
||||||
|
# note: TEMP_STAGE_DIR is sourced from environment
|
||||||
|
T_SOURCE_DIR="${TEMP_STAGE_DIR}/${APPNAME}"
|
||||||
|
|
||||||
|
# read defined arguments
|
||||||
|
opts=$(getopt \
|
||||||
|
--longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \
|
||||||
|
--name "$APPNAME" \
|
||||||
|
--options "" \
|
||||||
|
-- "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
# process supplied arguments into flags that enable execution modes
|
||||||
|
eval set --$opts
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--stage)
|
||||||
|
MODE_STAGE=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
MODE_BUILD=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
MODE_INSTALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
MODE_ALL=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
MODE_HELP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# print to stdout, print to log
|
||||||
|
logprint() {
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
echo "[$(date +%Y-%m-%d_%H:%M:%S)] [${APPNAME}] $1" \
|
||||||
|
| tee -a "${LOG_DIR}/${LOGFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tell the user we're alive...
|
||||||
|
logprint "Initializing the ${APPNAME} utility..."
|
||||||
|
|
||||||
|
# when the stage mode is enabled, this will execute
|
||||||
|
mode_stage() {
|
||||||
|
logprint "Starting stage of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Removing any pre-existing staging for ${APPNAME}."
|
||||||
|
rm -Rf "${T_SOURCE_DIR}"*
|
||||||
|
|
||||||
|
logprint "Extracting ${APPNAME}-${VERSION} source archive to ${TEMP_STAGE_DIR}"
|
||||||
|
tar xf "${SOURCES_DIR}/${APPNAME}-${VERSION}.tar."* -C "${TEMP_STAGE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
# conditionally rename if it needs it
|
||||||
|
stat "${T_SOURCE_DIR}-"* && mv "${T_SOURCE_DIR}-"* "${T_SOURCE_DIR}"
|
||||||
|
|
||||||
|
logprint "Staging operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
# when the build_pass1 mode is enabled, this will execute
|
||||||
|
mode_build() {
|
||||||
|
|
||||||
|
# patch, configure and build
|
||||||
|
logprint "Starting build of ${APPNAME}..."
|
||||||
|
|
||||||
|
logprint "Entering build dir."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Configuring ${APPNAME}..."
|
||||||
|
./configure --prefix=/usr
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Compiling..."
|
||||||
|
make
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Checking"
|
||||||
|
make -k check
|
||||||
|
logprint "Checks exited with '$?'. "
|
||||||
|
|
||||||
|
logprint "Build operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
mode_install() {
|
||||||
|
logprint "Starting install of ${APPNAME}..."
|
||||||
|
pushd "${T_SOURCE_DIR}"
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Installing..."
|
||||||
|
make install
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Post-install cleanup"
|
||||||
|
rm -fv /usr/lib/libltdl.a
|
||||||
|
assert_zero $?
|
||||||
|
|
||||||
|
logprint "Install operation complete."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mode_help() {
|
||||||
|
echo "${APPNAME} [ --stage ] [ --build_temp ] [ --install_temp ] [ --all_temp ] [ --help ]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$MODE_ALL" = "true" ]; then
|
||||||
|
MODE_STAGE=true
|
||||||
|
MODE_BUILD=true
|
||||||
|
MODE_INSTALL=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no options were selected, then show help and exit
|
||||||
|
if \
|
||||||
|
[ "$MODE_HELP" != "true" ] && \
|
||||||
|
[ "$MODE_STAGE" != "true" ] && \
|
||||||
|
[ "$MODE_BUILD" != "true" ] && \
|
||||||
|
[ "$MODE_INSTALL" != "true" ]
|
||||||
|
then
|
||||||
|
logprint "No option selected during execution."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if help was supplied at all, show help and exit
|
||||||
|
if [ "$MODE_HELP" = "true" ]; then
|
||||||
|
logprint "Help option selected. Printing options and exiting."
|
||||||
|
mode_help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_STAGE" = "true" ]; then
|
||||||
|
logprint "Staging option selected."
|
||||||
|
mode_stage
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_BUILD" = "true" ]; then
|
||||||
|
logprint "Build of ${APPNAME} selected."
|
||||||
|
mode_build
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODE_INSTALL" = "true" ]; then
|
||||||
|
logprint "Install of ${APPNAME} selected."
|
||||||
|
mode_install
|
||||||
|
assert_zero $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
logprint "Execution of ${APPNAME} completed."
|
|
@ -5,36 +5,6 @@
|
||||||
"name": "welcome master",
|
"name": "welcome master",
|
||||||
"dependencies": [ null ],
|
"dependencies": [ null ],
|
||||||
"comment": "greet the user"
|
"comment": "greet the user"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkg-config",
|
|
||||||
"dependencies": [ null ],
|
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.27"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ncurses pass 2",
|
|
||||||
"dependencies": [ null ],
|
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.28"
|
|
||||||
}
|
|
||||||
{
|
|
||||||
"name": "ncurses legacy",
|
|
||||||
"dependencies": [ null ],
|
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.28"
|
|
||||||
}
|
|
||||||
{
|
|
||||||
"name": "sed pass 2",
|
|
||||||
"dependencies": [ null ],
|
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.29"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psmisc",
|
|
||||||
"dependencies": [ null ],
|
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.30"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gettext pass 2",
|
|
||||||
"dependencies": [ null ],
|
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.31"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,81 @@
|
||||||
"name": "gcc pass 3",
|
"name": "gcc pass 3",
|
||||||
"dependencies": [ null ],
|
"dependencies": [ null ],
|
||||||
"comment": "LFS 11.3-systemd-rc1 Ch. 8.26 -- endlessly fucking with compilers forever"
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.26 -- endlessly fucking with compilers forever"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pkg-config",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.27"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ncurses pass 2",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.28"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ncurses legacy",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.28"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sed pass 2",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psmisc",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.30"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gettext pass 2",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.31"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bison pass 2",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "grep pass 2",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.33"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bash pass 2",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.34"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "libtool",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.35"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdbm",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.36"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gperf",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.37"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "expat",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.38"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inetutils",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.39"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "less",
|
||||||
|
"dependencies": [ null ],
|
||||||
|
"comment": "LFS 11.3-systemd-rc1 Ch. 8.40"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,114 +17,6 @@
|
||||||
"group": "root",
|
"group": "root",
|
||||||
"supply_environment": true,
|
"supply_environment": true,
|
||||||
"environment": "environments/stage4.env.bash"
|
"environment": "environments/stage4.env.bash"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkg-config",
|
|
||||||
"target": "components/stage4/pkg-config.bash --all",
|
|
||||||
"is_shell_command": true,
|
|
||||||
"shell_definition": "bash",
|
|
||||||
"force_pty": true,
|
|
||||||
"set_working_directory": false,
|
|
||||||
"working_directory": "",
|
|
||||||
"rectify": false,
|
|
||||||
"rectifier": "",
|
|
||||||
"active": true,
|
|
||||||
"required": true,
|
|
||||||
"set_user_context": true,
|
|
||||||
"user": "root",
|
|
||||||
"group": "root",
|
|
||||||
"supply_environment": true,
|
|
||||||
"environment": "environments/stage4.env.bash"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ncurses pass 2",
|
|
||||||
"target": "components/stage4/ncurses.bash --all",
|
|
||||||
"is_shell_command": true,
|
|
||||||
"shell_definition": "bash",
|
|
||||||
"force_pty": true,
|
|
||||||
"set_working_directory": false,
|
|
||||||
"working_directory": "",
|
|
||||||
"rectify": false,
|
|
||||||
"rectifier": "",
|
|
||||||
"active": true,
|
|
||||||
"required": true,
|
|
||||||
"set_user_context": true,
|
|
||||||
"user": "root",
|
|
||||||
"group": "root",
|
|
||||||
"supply_environment": true,
|
|
||||||
"environment": "environments/stage4.env.bash"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ncurses legacy",
|
|
||||||
"target": "components/stage4/ncurses-legacy.bash --all",
|
|
||||||
"is_shell_command": true,
|
|
||||||
"shell_definition": "bash",
|
|
||||||
"force_pty": true,
|
|
||||||
"set_working_directory": false,
|
|
||||||
"working_directory": "",
|
|
||||||
"rectify": false,
|
|
||||||
"rectifier": "",
|
|
||||||
"active": true,
|
|
||||||
"required": true,
|
|
||||||
"set_user_context": true,
|
|
||||||
"user": "root",
|
|
||||||
"group": "root",
|
|
||||||
"supply_environment": true,
|
|
||||||
"environment": "environments/stage4.env.bash"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "sed pass 2",
|
|
||||||
"target": "components/stage4/sed.bash --all",
|
|
||||||
"is_shell_command": true,
|
|
||||||
"shell_definition": "bash",
|
|
||||||
"force_pty": true,
|
|
||||||
"set_working_directory": false,
|
|
||||||
"working_directory": "",
|
|
||||||
"rectify": false,
|
|
||||||
"rectifier": "",
|
|
||||||
"active": true,
|
|
||||||
"required": true,
|
|
||||||
"set_user_context": true,
|
|
||||||
"user": "root",
|
|
||||||
"group": "root",
|
|
||||||
"supply_environment": true,
|
|
||||||
"environment": "environments/stage4.env.bash"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psmisc",
|
|
||||||
"target": "components/stage4/psmisc.bash --all",
|
|
||||||
"is_shell_command": true,
|
|
||||||
"shell_definition": "bash",
|
|
||||||
"force_pty": true,
|
|
||||||
"set_working_directory": false,
|
|
||||||
"working_directory": "",
|
|
||||||
"rectify": false,
|
|
||||||
"rectifier": "",
|
|
||||||
"active": true,
|
|
||||||
"required": true,
|
|
||||||
"set_user_context": true,
|
|
||||||
"user": "root",
|
|
||||||
"group": "root",
|
|
||||||
"supply_environment": true,
|
|
||||||
"environment": "environments/stage4.env.bash"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gettext pass 2",
|
|
||||||
"target": "components/stage4/gettext.bash --all",
|
|
||||||
"is_shell_command": true,
|
|
||||||
"shell_definition": "bash",
|
|
||||||
"force_pty": true,
|
|
||||||
"set_working_directory": false,
|
|
||||||
"working_directory": "",
|
|
||||||
"rectify": false,
|
|
||||||
"rectifier": "",
|
|
||||||
"active": true,
|
|
||||||
"required": true,
|
|
||||||
"set_user_context": true,
|
|
||||||
"user": "root",
|
|
||||||
"group": "root",
|
|
||||||
"supply_environment": true,
|
|
||||||
"environment": "environments/stage4.env.bash"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,6 +449,276 @@
|
||||||
"group": "root",
|
"group": "root",
|
||||||
"supply_environment": true,
|
"supply_environment": true,
|
||||||
"environment": "environments/stage4.env.bash"
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pkg-config",
|
||||||
|
"target": "components/stage4/pkg-config.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ncurses pass 2",
|
||||||
|
"target": "components/stage4/ncurses.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ncurses legacy",
|
||||||
|
"target": "components/stage4/ncurses-legacy.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sed pass 2",
|
||||||
|
"target": "components/stage4/sed.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psmisc",
|
||||||
|
"target": "components/stage4/psmisc.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gettext pass 2",
|
||||||
|
"target": "components/stage4/gettext.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bison pass 2",
|
||||||
|
"target": "components/stage4/bison.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "grep pass 2",
|
||||||
|
"target": "components/stage4/grep.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bash pass 2",
|
||||||
|
"target": "components/stage4/bash.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "libtool",
|
||||||
|
"target": "components/stage4/libtool.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdbm",
|
||||||
|
"target": "components/stage4/gdbm.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gperf",
|
||||||
|
"target": "components/stage4/gperf.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "expat",
|
||||||
|
"target": "components/stage4/expat.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inetutils",
|
||||||
|
"target": "components/stage4/inetutils.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "less",
|
||||||
|
"target": "components/stage4/less.bash --all",
|
||||||
|
"is_shell_command": true,
|
||||||
|
"shell_definition": "bash",
|
||||||
|
"force_pty": true,
|
||||||
|
"set_working_directory": false,
|
||||||
|
"working_directory": "",
|
||||||
|
"rectify": false,
|
||||||
|
"rectifier": "",
|
||||||
|
"active": true,
|
||||||
|
"required": true,
|
||||||
|
"set_user_context": true,
|
||||||
|
"user": "root",
|
||||||
|
"group": "root",
|
||||||
|
"supply_environment": true,
|
||||||
|
"environment": "environments/stage4.env.bash"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue