2022-06-13 20:29:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
2015-12-28 01:11:17 +00:00
|
|
|
|
|
|
|
# Detect if the environment isn't set up properly.
|
|
|
|
if [ -z "$HOST" ]; then
|
|
|
|
echo "$0: error: You need to set \$HOST" >&2
|
|
|
|
exit 1
|
|
|
|
elif [ -z "$SORTIX_REPOSITORY_DIR" ]; then
|
|
|
|
echo "$0: error: You need to set \$SORTIX_REPOSITORY_DIR" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -d "$SORTIX_REPOSITORY_DIR" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
SORTIX_REPOSITORY_DIR="$SORTIX_REPOSITORY_DIR/$HOST"
|
|
|
|
if ! [ -d "$SORTIX_REPOSITORY_DIR" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-06-13 20:29:53 +00:00
|
|
|
PACKAGES="$("$(dirname -- "$0")"/list-packages.sh PACKAGES)"
|
|
|
|
|
2015-12-28 01:11:17 +00:00
|
|
|
mkdir -p "$1"
|
|
|
|
|
2022-06-13 20:29:53 +00:00
|
|
|
for PACKAGE in $PACKAGES; do
|
|
|
|
cp "$SORTIX_REPOSITORY_DIR/$PACKAGE.tix.tar.xz" "$1"
|
|
|
|
cp "$SORTIX_REPOSITORY_DIR/$PACKAGE.version" "$1"
|
|
|
|
done
|