first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / database / call_movie_seeker.sh
1 #!/bin/bash
2
3 # processes cgi request and passes it on to the real script.
4
5 movie_name="$(echo $QUERY_STRING | sed -e "s/^[^=][^=]*=\(.*\)$/\1/" | sed -e "s/\+/ /g")"
6 vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv"
7
8 randof="$(mktemp "$TMP/zz_randocgi.XXXXXX")"
9
10 sh movie_seeker.sh "$vids" "$movie_name" &>"$randof"
11
12 if [ -s "$randof" ]; then
13
14   echo "Content-type: text/plain"
15   echo ""
16   echo ""
17   cat "$randof"
18
19 else
20
21   echo "Content-type: text/html"
22   echo ""
23   echo ""
24   cat /var/www/yeti/pictures/no_matches.html
25
26 fi
27
28 rm "$randof"
29
30