about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/substitute/substitute-all.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/build-support/substitute/substitute-all.sh')
-rw-r--r--nixpkgs/pkgs/build-support/substitute/substitute-all.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/substitute/substitute-all.sh b/nixpkgs/pkgs/build-support/substitute/substitute-all.sh
new file mode 100644
index 000000000000..ec220481fcc0
--- /dev/null
+++ b/nixpkgs/pkgs/build-support/substitute/substitute-all.sh
@@ -0,0 +1,19 @@
+source $stdenv/setup
+
+eval "$preInstall"
+
+args=
+
+target=$out
+if test -n "$dir"; then
+    target=$out/$dir/$name
+    mkdir -p $out/$dir
+fi
+
+substituteAll $src $target
+
+if test -n "$isExecutable"; then
+    chmod +x $target
+fi
+
+eval "$postInstall"