stdenv/stripHash: print to stdout, not to variable

`stripHash` documentation states that it prints out the stripped name to
the stdout, but the function stored the value in `strippedName`
instead.

Basically all usages did something like
`$(stripHash $foo | echo $strippedName)` which is just braindamaged.
Fixed the implementation and all invocations.
This commit is contained in:
Profpatsch
2016-10-11 18:09:56 +02:00
committed by Franz Pletz
parent 8417c3aae1
commit bef6bef0d2
15 changed files with 27 additions and 22 deletions

View File

@@ -4,6 +4,6 @@ mkdir -p $out
for ((i = 1; i <= $nrFrames; i++)); do
echo "producing frame $i...";
targetName=$out/$(basename $(stripHash $dotGraph; echo $strippedName) .dot)-f-$i.dot
targetName=$out/$(basename $(stripHash $dotGraph) .dot)-f-$i.dot
cpp -DFRAME=$i < $dotGraph > $targetName
done

View File

@@ -185,7 +185,7 @@ rec {
if test -d $postscript; then
input=$(ls $postscript/*.ps)
else
input=$(stripHash $postscript; echo $strippedName)
input=$(stripHash $postscript)
ln -s $postscript $input
fi

View File

@@ -4,7 +4,7 @@ mkdir -p $out
dot2pdf() {
sourceFile=$1
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).pdf
targetName=$out/$(basename $(stripHash $sourceFile) .dot).pdf
echo "converting $sourceFile to $targetName..."
export FONTCONFIG_FILE=$fontsConf
dot -Tpdf $sourceFile > $targetName

View File

@@ -4,7 +4,7 @@ mkdir -p $out
dot2ps() {
sourceFile=$1
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).ps
targetName=$out/$(basename $(stripHash $sourceFile) .dot).ps
echo "converting $sourceFile to $targetName..."
dot -Tps $sourceFile > $targetName
}

View File

@@ -10,7 +10,7 @@ cd $startDir
lhstex() {
sourceFile=$1
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .lhs).tex
targetName=$out/$(basename $(stripHash $sourceFile) .lhs).tex
echo "converting $sourceFile to $targetName..."
lhs2TeX -o "$targetName" $flags "$sourceFile"
}

View File

@@ -16,11 +16,11 @@ for i in $extraFiles; do
if test -d $i; then
ln -s $i/* .
else
ln -s $i $(stripHash $i; echo $strippedName)
ln -s $i $(stripHash $i)
fi
done
rootName=$(basename $(stripHash "$rootFile"; echo $strippedName))
rootName=$(basename $(stripHash "$rootFile"))
rootNameBase=$(echo "$rootName" | sed 's/\..*//')