#
# Just in case this gets included twice ...
-[ "$_next_common_included" ] && return 0
+if [ "$_next_common_included" ]; then
+ return 0
+fi
_next_common_included=1
bin_dir=$(realpath "$(dirname "$0")")
top_dir=$(dirname "$bin_dir")
-[ "$LOG_FILE" ] || LOG_FILE="$top_dir/merge.log"
+if [ -z "$LOG_FILE" ]; then
+ LOG_FILE="$top_dir/merge.log"
+fi
SHA1_FILE="$top_dir/SHA1s"
CTRL_FILE="$top_dir/etc/control"
gpg_key=89F91C0A41D5C07A
kup_gpg_key=015042F34957D06C
-[ "$NEXT_BUILD_HOST" ] && {
+if [ "$NEXT_BUILD_HOST" ]; then
build_host="$NEXT_BUILD_HOST"
- [ "$build_host" = "none" ] && build_host=""
-}
-[ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
-[ "$NEXT_GCC_VERSION" ] && gcc_version="$NEXT_GCC_VERSION"
+ if [ "$build_host" = "none" ]; then
+ build_host=""
+ fi
+fi
+if [ "$NEXT_BUILD_DIR" ]; then
+ build_dir="$NEXT_BUILD_DIR"
+fi
+if [ "$NEXT_GCC_VERSION" ]; then
+ gcc_version="$NEXT_GCC_VERSION"
+fi
gcc_ppc_version=$gcc_version
-[ "$NEXT_GCC_PPC_VERSION" ] && gcc_ppc_version="$NEXT_GCC_PPC_VERSION"
+if [ "$NEXT_GCC_PPC_VERSION" ]; then
+ gcc_ppc_version="$NEXT_GCC_PPC_VERSION"
+fi
gcc_ppcle_version=$gcc_ppc_version
-[ "$NEXT_GCC_PPCLE_VERSION" ] && gcc_ppcle_version="$NEXT_GCC_PPCLE_VERSION"
-[ "$NEXT_J_FACTOR" ] && j_factor="$NEXT_J_FACTOR"
+if [ "$NEXT_GCC_PPCLE_VERSION" ]; then
+ gcc_ppcle_version="$NEXT_GCC_PPCLE_VERSION"
+fi
+if [ "$NEXT_J_FACTOR" ]; then
+ j_factor="$NEXT_J_FACTOR"
+fi
-[ -n "$1" ] && {
+if [ -n "$1" ]; then
build_host="$1"
shift
-}
-[ -n "$1" ] && {
+fi
+if [ -n "$1" ]; then
build_dir="$1"
shift
-}
+fi
export NEXT_BUILD_HOST="${build_host:-none}"
export NEXT_BUILD_DIR="$build_dir"