mirror of
https://github.com/RGBCube/HTMNIX
synced 2025-07-26 07:27:44 +00:00
Use a proper env var for the flakeref in build.sh
This commit is contained in:
parent
8d3f0fdde6
commit
ebc812fbe7
1 changed files with 1 additions and 7 deletions
8
build.sh
8
build.sh
|
@ -9,17 +9,11 @@ for dir in $(find site -type d); do
|
||||||
mkdir -p "_$dir"
|
mkdir -p "_$dir"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$HTMNIX_LOCAL" == 1 ]]; then
|
|
||||||
FLAKE_REF=.
|
|
||||||
else
|
|
||||||
FLAKE_REF=github:RGBCube/HTMNIX
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in $(find site -type f); do
|
for file in $(find site -type f); do
|
||||||
if [[ ! "$file" =~ ^_ ]]; then
|
if [[ ! "$file" =~ ^_ ]]; then
|
||||||
if [[ "$file" =~ .nix$ ]]; then
|
if [[ "$file" =~ .nix$ ]]; then
|
||||||
echo "Processing file $file to _${file%.nix}.html..."
|
echo "Processing file $file to _${file%.nix}.html..."
|
||||||
TARGET_FILE=$(realpath "$file") nix eval "$FLAKE_REF#result" --impure --raw --apply toString > "_${file%.nix}.html"
|
TARGET_FILE=$(realpath "$file") nix eval "${HTMNIX_REF:-github:RGBCube/HTMNIX}#result" --impure --raw --apply toString > "_${file%.nix}.html"
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
else
|
else
|
||||||
echo "Copying file $file to _$file..."
|
echo "Copying file $file to _$file..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue