From f5cb498796fbeadbdb584a243816a1f2863caf65 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Sun, 11 Jun 2023 19:01:25 +0100 Subject: [PATCH] Explicitly patch shebangs --- bin/mdpage.sh | 2 +- bin/page.sh | 2 +- bin/rss.sh | 2 +- bin/toc.sh | 2 +- knazarov.com.nix | 5 +++++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/mdpage.sh b/bin/mdpage.sh index 77266aa..8cb25ad 100755 --- a/bin/mdpage.sh +++ b/bin/mdpage.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/bin/page.sh b/bin/page.sh index 0260e76..1708c48 100755 --- a/bin/page.sh +++ b/bin/page.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash expand() { TITLE="$1" diff --git a/bin/rss.sh b/bin/rss.sh index b2760aa..a09330b 100755 --- a/bin/rss.sh +++ b/bin/rss.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash remove_nbsp() { sed 's#\ # #g' diff --git a/bin/toc.sh b/bin/toc.sh index 91f1994..6aed27e 100755 --- a/bin/toc.sh +++ b/bin/toc.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/knazarov.com.nix b/knazarov.com.nix index d642bca..57b2914 100644 --- a/knazarov.com.nix +++ b/knazarov.com.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { dontPatch = true; installFlags = "PREFIX=${placeholder "out"} VERSION=${version}"; + + preBuild = '' + patchShebangs bin/*.sh + ''; + buildInputs = with pkgs; [ gawk gnused