#!/bin/bash # Assemble the nightly bundle for one target: the packages, repository # metadata so the directory also works as a dnf/zypper/apt repository, and # an INSTALL.txt. Produces confluent-nightly-.tar.gz in . # # Usage: mkbundle.sh ... # target is - set -e TARGET=$1 VERSION=$2 OUTDIR=$(readlink -f "$3") shift 3 NAME=confluent-nightly-$TARGET DIR=$OUTDIR/$NAME REPO=${GITHUB_REPOSITORY:-xcat2/confluent} SHA=${GITHUB_SHA:-$(git rev-parse HEAD)} rm -rf "$DIR" mkdir -p "$DIR" cp "$@" "$DIR"/ echo "$VERSION" > "$DIR"/VERSION cat > "$DIR"/INSTALL.txt <> "$DIR"/INSTALL.txt <> "$DIR"/INSTALL.txt < /dev/null | gzip -9 > Packages.gz) cat >> "$DIR"/INSTALL.txt < /etc/apt/sources.list.d/confluent-nightly.list apt update && apt install confluent-server EOF ;; *) echo "unknown target $TARGET" >&2 exit 1 ;; esac cat >> "$DIR"/INSTALL.txt <