aboutsummaryrefslogtreecommitdiff
path: root/version_info
blob: 3a35948dad92b538b701bec0d0a0ecfecd25126c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

find *.lua *.txt textures  -type f | fgrep -v textures/moreblocks_version_node.png | head -24 >.filelist

echo -n "" >.datelist

cat .filelist | while read line ; do
	echo "$(date --iso=m -r ${line})  ${line}" >>.datelist
done



(echo "$(date --iso=m)  [$(basename "$(realpath . )")]" ; cat .datelist | sed 's/  textures/  t/' | sort -r ) | anytopnm >.image

WIDTH=$(head -2 .image | tail -1 | awk '{ print $1 }')
HEIGHT=$(head -2 .image | tail -1 | awk '{ print $2 }')

echo $WIDTH
echo $HEIGHT

if [ $WIDTH -gt $HEIGHT ] ; then
	ppmmake white 1 $((WIDTH-HEIGHT)) >.image_temp
	pnmcat -tb .image .image_temp >.image2
fi

if [ $WIDTH -lt $HEIGHT ] ; then
        ppmmake white  $((HEIGHT-WIDTH)) 1 >.image_temp
        pnmcat -lr .image .image_temp >.image2
fi


pnmtopng .image2 >textures/moreblocks_version_node.png