fix crash, and improve makefile
[7seg/.git] / montage
1 #!/bin/bash
2 # Usage: ./shit.sh (takes input via stdin in the form of space separated usernames)
3
4 userlist=
5 filelist=""
6 picpath="/users/ssalbiz/dev/invcam"
7 line=""
8 rc=0
9
10 #while read -e userlist
11 read -e userlist
12 #do
13   for user in $userlist
14   do
15     echo $user
16     f="${picpath}/${user}.png"
17     if [ -f  "${picpath}/${user}.png" ]; then
18       f="${picpath}/${user}.png"
19     else
20       f="${picpath}/placeholder.png"
21     fi
22     filelist="$filelist ${f}"
23   done
24   echo $filelist
25
26   if [ ${#filelist} -gt 0 ]; then
27     echo montage -border 0 -geometry "1024x720+5+5" -background black $filelist "bg.png"
28     montage -border 0 -geometry "1024x720+5+5" -background black -label '%t' $filelist "${picpath}/bg.png"
29     ./blit_fb "${picpath}/bg.png"
30   else
31 #    echo feh --bg-scale "${picpath}/black.png"
32     ./blit_fb "${picpath}/black.png"
33   fi
34 #done