Skip to content

Commit a537e6c

Browse files
fix build sh for all platforms
1 parent 26cec2e commit a537e6c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

scripts/build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ cat > "$BUILD_DIR/resources.html" << 'RESOURCES_HTML'
411411
RESOURCES_HTML
412412

413413
# Copy setup.html from source, replacing dev CSS links with the minified bundle
414-
sed '/<!-- BUILD:CSS -->/,/<!-- \/BUILD:CSS -->/c\ <link rel="stylesheet" href="frametrail.min.css">' \
414+
awk '/<!-- BUILD:CSS -->/{print " <link rel=\"stylesheet\" href=\"frametrail.min.css\">"; skip=1; next} /<!-- \/BUILD:CSS -->/{skip=0; next} !skip{print}' \
415415
"$SRC_DIR/setup.html" > "$BUILD_DIR/setup.html"
416416

417417
# ──────────────────────────────────────────────
@@ -431,8 +431,8 @@ cp -r "$SRC_DIR/_server" "$BUILD_DIR/_server"
431431
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
432432
cp "$REPO_ROOT/LICENSE.md" "$BUILD_DIR/"
433433

434-
cat > "$BUILD_DIR/README.md" << README
435-
# FrameTrail ${VERSION}
434+
cat > "$BUILD_DIR/README.md" << 'README'
435+
# FrameTrail __VERSION__
436436
437437
## Installation
438438
@@ -457,6 +457,8 @@ https://github.com/OpenHypervideo/FrameTrail
457457
FrameTrail is dual licensed under MIT and GPL v3.
458458
See LICENSE.md for details.
459459
README
460+
sed -i.bak "s/__VERSION__/${VERSION}/" "$BUILD_DIR/README.md"
461+
rm -f "$BUILD_DIR/README.md.bak"
460462

461463
# ──────────────────────────────────────────────
462464
# Summary

0 commit comments

Comments
 (0)