stdenv: introduce baseHash() to replace stripHash()
stripHash uses a global variable to communicate it's computation results, but it's not necessary. You can just pipe to stdout in a subshell. A function mostly behaves like just another command. baseHash() also introduces a suffix-stripping capability since it's something the users of the function tend to use.
This commit is contained in:
@@ -3,5 +3,4 @@ source $stdenv/setup
|
||||
mkdir -p $out/xml/dtd/docbook-ebnf
|
||||
cd $out/xml/dtd/docbook-ebnf
|
||||
cp -p $dtd dbebnf.dtd
|
||||
stripHash $catalog
|
||||
cp -p $catalog $strippedName
|
||||
cp -p $catalog $(baseHash $catalog)
|
||||
|
||||
Reference in New Issue
Block a user