mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-29 01:34:37 +01:00
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.
21 lines
671 B
Bash
Executable File
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"
|