Home | History | Annotate | Download | only in turbovnc
      1 #!/bin/sh
      2 #
      3 # This script has been (or is hereby) released into the public domain by
      4 # its author, Karl J. Runge <runge (at] karlrunge.com>. This applies worldwide.
      5 # 
      6 # In case this is not legally possible: Karl J. Runge grants anyone the
      7 # right to use this work for any purpose, without any conditions, unless
      8 # such conditions are required by law.
      9 
     10 ldir="../../../libvncserver"
     11 
     12 fail=""
     13 if [ ! -f "./tight.c" ]; then
     14 	fail=1
     15 fi
     16 if [ ! -f "./turbojpeg.h" ]; then
     17 	fail=1
     18 fi
     19 if [ ! -f "./convert" ]; then
     20 	fail=1
     21 fi
     22 if [ ! -f "$ldir/tight.c" ]; then
     23 	ls -l "$ldir/tight.c"
     24 	fail=1
     25 fi
     26 if [ ! -f "$ldir/rfbserver.c" ]; then
     27 	ls -l "$ldir/rfbserver.c"
     28 	fail=1
     29 fi
     30 if [ "X$fail" = "X1" ]; then
     31 	echo "Must be run from inside the directory containing 'apply_turbovnc'"
     32 	exit 1
     33 fi
     34 
     35 set -x
     36 if [ ! -f "$ldir/tight.c.ORIG" ]; then
     37 	cp -p "$ldir/tight.c" "$ldir/tight.c.ORIG"
     38 fi
     39 if [ ! -f "$ldir/rfbserver.c.ORIG" ]; then
     40 	cp -p "$ldir/rfbserver.c" "$ldir/rfbserver.c.ORIG"
     41 fi
     42 
     43 perl ./convert ./tight.c > "$ldir/tight.c"
     44 perl ./convert_rfbserver $ldir/rfbserver.c.ORIG > "$ldir/rfbserver.c"
     45 cp -p ./turbojpeg.h "$ldir"
     46 ls -l $ldir/tight.c* $ldir/rfbserver.c* $ldir/turbojpeg.h
     47