Create tix collection even if PACKAGES is empty.

This commit is contained in:
Jonas 'Sortie' Termansen 2015-11-22 21:54:54 +01:00
parent 507d7d73ab
commit ee971b463b
1 changed files with 12 additions and 14 deletions

View File

@ -1,4 +1,4 @@
set -e
#!/bin/sh -e
make_dir_path_absolute() {
(cd "$1" && pwd)
@ -9,9 +9,7 @@ has_command() {
}
# Detect if the environment isn't set up properly.
if [ -z "$PACKAGES" -a "${PACKAGES+x}" = 'x' ]; then
exit 0
elif [ -z "$HOST" ]; then
if [ -z "$HOST" ]; then
echo "$0: error: You need to set \$HOST" >&2
exit 1
elif [ -z "$SYSROOT" ]; then
@ -54,6 +52,16 @@ CXXFLAGS="$CXXFLAGS -Werror=format -Wno-error=format-contains-nul"
export CFLAGS
export CXXFLAGS
# Create the system root if absent.
mkdir -p "$SYSROOT"
# Create the binary package repository.
mkdir -p "$SORTIX_REPOSITORY_DIR"
# Initialize Tix package management in the system root if absent.
[ -e "$SYSROOT/tix/collection.conf" ] ||
tix-collection "$SYSROOT" create --platform=$HOST --prefix= --disable-multiarch --generation=2
# Detect all packages.
get_all_packages() {
for PACKAGE in $(ls "$SORTIX_PORTS_DIR"); do
@ -124,16 +132,6 @@ BUILD_LIST=$(unset MAKE;
rm -f "$DEPENDENCY_MAKEFILE"
PACKAGES="$BUILD_LIST"
# Create the system root if absent.
mkdir -p "$SYSROOT"
# Create the binary package repository.
mkdir -p "$SORTIX_REPOSITORY_DIR"
# Initialize Tix package management in the system root if absent.
[ -e "$SYSROOT/tix/collection.conf" ] ||
tix-collection "$SYSROOT" create --platform=$HOST --prefix= --disable-multiarch --generation=2
# Build all the packages (if needed) and otherwise install them.
for PACKAGE in $PACKAGES; do
[ -f "$SORTIX_REPOSITORY_DIR/$PACKAGE.tix.tar.xz" ] ||