Author: simons
Date: 2010-06-25 14:05:37 +0000 (Fri, 25 Jun 2010)
New Revision: 22412

You can view the changes in this commit at:
   https://svn.nixos.org/viewvc/nix?rev=22412&view=rev

Modified:
   nix/trunk/tests/build-hook.hook.sh

Log:
tests/build-hook.hook.sh: prefer more portable `...` syntax over $(...) for 
running sub-shells

The /bin/sh interpreter on Solaris doesn't understand $(...) syntax for running
sub-shells. Consequently, this test fails on Solaris. To remedy the situation,
the script either needs to be run by /bin/bash -- which is non-standard --, or
it needs to use the ancient but portable `...` syntax.

Changes:

Modified: nix/trunk/tests/build-hook.hook.sh
===================================================================
--- nix/trunk/tests/build-hook.hook.sh  2010-06-24 23:05:15 UTC (rev 22411)
+++ nix/trunk/tests/build-hook.hook.sh  2010-06-25 14:05:37 UTC (rev 22412)
@@ -6,11 +6,11 @@
 
 echo "HOOK for $drv" >&2
 
-outPath=$(sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv)
+outPath=`sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv`
 
 echo "output path is $outPath" >&2
 
-if $(echo $outPath | grep -q input-1); then
+if `echo $outPath | grep -q input-1`; then
     echo "# accept" >&2
     read x
     echo "got $x"

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to