Files
figcraft/packaging/linux/nightly-arch-tar.sh
T
skylar taylor-barrick 39c1f94a4f Use the shared nightly launcher template (#2628)
Renders the plain nightly tar's launcher from craft-common-actions' shared template.

Independent check: dylanmtaylor compared all 14 app launcher PRs byte for byte with the template rendered from the registry (https://github.com/storytold/craft-common-actions/pull/367#issuecomment-7172085284); this head was re-checked against craft-common-actions main 88148a5.
2026-11-25 16:17:05 -06:00

21 lines
671 B
Bash
Executable File

#!/usr/bin/env bash
# Stage the FigCraft Nightly-only handoff for the Arch packager.
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
source_tree="$1"
work="$2"
destination="$3"
basename="$4"
stage="$work/$basename"
mkdir -p "$work"
cp -R "$source_tree" "$stage"
mkdir "$stage/bin/.figcraft-nightly"
mv "$stage/bin/figcraft" "$stage/bin/.figcraft-nightly/figcraft"
awk -v real='"$(dirname "$0")/.figcraft-nightly/figcraft"' '{ gsub(/@REAL_BIN@/, real); print }' \
"$here/nightly-package-launch.sh" >"$stage/bin/figcraft"
chmod 755 "$stage/bin/figcraft"
tar -C "$work" -czf "$destination/$basename.tar.gz" "$basename"
echo "wrote $destination/$basename.tar.gz"