Set filenames to variables in v1 script

This commit is contained in:
mmcwilliams 2020-05-23 14:26:18 -04:00
parent e2d4a3c63b
commit ceb7580f8b
1 changed files with 9 additions and 7 deletions

View File

@ -24,17 +24,19 @@ do
for FILE in "${FILES[@]}" for FILE in "${FILES[@]}"
do do
: :
echo "${SIZE}_v1/${FILE}.scad" stl="${DIST}/${SIZE}_v1/gnal_${SIZE}_${FILE}.stl"
scad="${SIZE}_v1/${FILE}.scad"
echo "$scad"
start=`date +%s` start=`date +%s`
openscad -o "${DIST}/${SIZE}_v1/gnal_${SIZE}_${FILE}.stl" "${SIZE}_v1/${FILE}.scad" openscad -o "$stl" "$scad"
end=`date +%s` end=`date +%s`
runtime=$((end-start)) runtime=$((end-start))
hash=`sha256sum "${DIST}/${SIZE}_v1/gnal_${SIZE}_${FILE}.stl" | awk '{ print $1 }'` hash=`sha256sum "$stl" | awk '{ print $1 }'`
fileSize=`wc -c < "${DIST}/${SIZE}_v1/gnal_${SIZE}_${FILE}.stl"` fileSize=`wc -c < "$stl"`
fileSize=`echo $fileSize | xargs` fileSize=`echo $fileSize | xargs`
ao=`admesh -c "${DIST}/${SIZE}_v1/gnal_${SIZE}_${FILE}.stl"` ao=`admesh -c "$stl"`
facets=`echo $ao | grep "Number of facets" | awk '{print $5}'` facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
volume=`echo $ao | grep "Number of parts" | awk '{print $8}'` volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
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"