Optimization-- 15sec render instead of 23sec
This commit is contained in:
parent
8c2e679bee
commit
8f9ea166bc
23
render.sh
23
render.sh
|
@ -17,24 +17,17 @@ do
|
|||
then
|
||||
point_data=$(sh lib/json.sh $file | grep board/pieces/${widthi},${heighti}/ | grep =)
|
||||
point_data=$(echo $point_data | sed 's/ = /=/g' | sed 's/ /^/g')
|
||||
echo $point_data
|
||||
string_one=$(echo $point_data | sed 's/.*^//')
|
||||
echo $string_one
|
||||
string_two=$(echo $point_data | sed 's/^.*//')
|
||||
echo $string_two
|
||||
if echo $string_one | grep team=
|
||||
string_one=$(echo $point_data | awk -F^ '{print $1}')
|
||||
string_two=$(echo $point_data | awk -F^ '{print $2}')
|
||||
if echo $string_one | grep team= > /dev/null
|
||||
then
|
||||
team=$string_one
|
||||
piece=$string_two
|
||||
elif echo $string_one | grep piece=
|
||||
team=$( echo $string_one | sed 's/.*=//')
|
||||
piece=$(echo $string_two | sed 's/.*=//')
|
||||
elif echo $string_one | grep piece= > /dev/null
|
||||
then
|
||||
piece=$string_one
|
||||
team=$string_two
|
||||
piece=$(echo $string_one | sed 's/.*=//')
|
||||
team=$(echo $string_two | sed 's/.*=//')
|
||||
fi
|
||||
echo $string_one
|
||||
echo $string_two
|
||||
echo $piece
|
||||
echo $team
|
||||
text=$(sh lib/json.sh -s ${team}/pieces/${piece}/text $file)
|
||||
else
|
||||
text=" "
|
||||
|
|
Reference in New Issue