If no admesh, just print N/A
This commit is contained in:
parent
c4ede152f6
commit
52a9386cf7
|
@ -41,9 +41,14 @@ do
|
||||||
size=`wc -c < "${TMP}.stl"`
|
size=`wc -c < "${TMP}.stl"`
|
||||||
size=`echo $size | xargs`
|
size=`echo $size | xargs`
|
||||||
|
|
||||||
ao=`admesh -c "${TMP}.stl"`
|
if ! [ -x "$(command -v admesh)" ]; then
|
||||||
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
facets="N/A"
|
||||||
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
volume="N/A"
|
||||||
|
else
|
||||||
|
ao=`admesh -c "$stl"`
|
||||||
|
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
||||||
|
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
||||||
|
fi
|
||||||
|
|
||||||
line="${VERSION},${CPU},${DATE},${FILENAME},${D},${ROT},100,$size,$facets,$volume,$runtime"
|
line="${VERSION},${CPU},${DATE},${FILENAME},${D},${ROT},100,$size,$facets,$volume,$runtime"
|
||||||
echo $line
|
echo $line
|
||||||
|
|
|
@ -34,9 +34,14 @@ do
|
||||||
hash=`sha256sum "$stl" | awk '{ print $1 }'`
|
hash=`sha256sum "$stl" | awk '{ print $1 }'`
|
||||||
fileSize=`wc -c < "$stl"`
|
fileSize=`wc -c < "$stl"`
|
||||||
fileSize=`echo $fileSize | xargs`
|
fileSize=`echo $fileSize | xargs`
|
||||||
ao=`admesh -c "$stl"`
|
if ! [ -x "$(command -v admesh)" ]; then
|
||||||
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
facets="N/A"
|
||||||
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
volume="N/A"
|
||||||
|
else
|
||||||
|
ao=`admesh -c "$stl"`
|
||||||
|
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
||||||
|
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
||||||
|
fi
|
||||||
line="${VERSION},${CPU},gnal_${SIZE}_${FILE}.stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
|
line="${VERSION},${CPU},gnal_${SIZE}_${FILE}.stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
|
||||||
echo "$line" >> $NOTES
|
echo "$line" >> $NOTES
|
||||||
echo "$line"
|
echo "$line"
|
||||||
|
|
|
@ -38,9 +38,14 @@ do
|
||||||
hash=`sha256sum "$stl" | awk '{ print $1 }'`
|
hash=`sha256sum "$stl" | awk '{ print $1 }'`
|
||||||
fileSize=`wc -c < "$stl"`
|
fileSize=`wc -c < "$stl"`
|
||||||
fileSize=`echo $fileSize | xargs`
|
fileSize=`echo $fileSize | xargs`
|
||||||
ao=`admesh -c "$stl"`
|
if ! [ -x "$(command -v admesh)" ]; then
|
||||||
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
facets="N/A"
|
||||||
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
volume="N/A"
|
||||||
|
else
|
||||||
|
ao=`admesh -c "$stl"`
|
||||||
|
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
||||||
|
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
||||||
|
fi
|
||||||
line="${VERSION},${CPU},$stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
|
line="${VERSION},${CPU},$stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
|
||||||
echo "$line" >> $NOTES
|
echo "$line" >> $NOTES
|
||||||
echo "$line"
|
echo "$line"
|
||||||
|
|
|
@ -43,9 +43,14 @@ do
|
||||||
hash=`sha256sum "$stl" | awk '{ print $1 }'`
|
hash=`sha256sum "$stl" | awk '{ print $1 }'`
|
||||||
fileSize=`wc -c < "$stl"`
|
fileSize=`wc -c < "$stl"`
|
||||||
fileSize=`echo $fileSize | xargs`
|
fileSize=`echo $fileSize | xargs`
|
||||||
ao=`admesh -c "$stl"`
|
if ! [ -x "$(command -v admesh)" ]; then
|
||||||
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
facets="N/A"
|
||||||
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
volume="N/A"
|
||||||
|
else
|
||||||
|
ao=`admesh -c "$stl"`
|
||||||
|
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
||||||
|
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
||||||
|
fi
|
||||||
|
|
||||||
line="${VERSION},${CPU},$stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
|
line="${VERSION},${CPU},$stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
|
||||||
echo "$line" >> $NOTES
|
echo "$line" >> $NOTES
|
||||||
|
|
Loading…
Reference in New Issue