File: mkmarbles

package info (click to toggle)
gfpoken 1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 1,932 kB
  • ctags: 417
  • sloc: ansic: 2,984; sh: 1,446; makefile: 125
file content (33 lines) | stat: -rwxr-xr-x 1,143 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
# Make marble pictures for GFingerPoken
# Copyright 2005-2014  Bas Wijnen <wijnen@debian.org>
#
# This file is part of Gfingerpoken.
#
# Gfingerpoken is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Gfingerpoken is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

set -e

export HOME="`mktemp -d`"
export BLENDERDIR="$HOME/blender/"

blender -b "`dirname "$0"`"/marbles.blend -o "$BLENDERDIR" -P initdir -a

montage -geometry +0+0 -tile 64x1 -compose Copy -background none `seq 1 64 | xargs printf "$BLENDERDIR/%04d.png "` png/marbles.png

for i in `seq 1 64` ; do
	rm "$BLENDERDIR/`printf %04d $i`.png"
done

rm -rf "$HOME"