buildNodePackage: patch shebangs only in text files
commit9060376bcde5a023b14d80c7bfdb25f5aeabb57f
authorJaka Hudoklin <jakahudoklin@gmail.com>
dateThu 12 Feb 2015, 18:39 (12 years ago)
parent36e7a61
pkgs/development/web/nodejs/build-node-package.nix+2−2
@@ -64,8 +64,8 @@ let
6464 patchShebangs = dir: ''
6565 node=`type -p node`
6666 coffee=`type -p coffee || true`
67− find -L ${dir} -type f -print0 | \
68− xargs -0 sed --follow-symlinks -i \
67+ find -L ${dir} -type f -print0 | xargs -0 grep -Il . | \
68+ xargs sed --follow-symlinks -i \
6969 -e 's@#!/usr/bin/env node@#!'"$node"'@' \
7070 -e 's@#!/usr/bin/env coffee@#!'"$coffee"'@' \
7171 -e 's@#!/.*/node@#!'"$node"'@' \