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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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/\..*//')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user