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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#!/bin/sh
#
# Copyright (C) 2002 Constantin Kaplinsky. All Rights Reserved.
# Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
#
# This 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 2 of the License, or
# (at your option) any later version.
#
# This software 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 software; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
#
# vncinstall - copy the VNC programs to an installation directory.
#
if [ $# -ne 1 -a $# -ne 2 -o ! -d "$1" ]; then
echo "Usage: $0 <INSTALLATION-DIRECTORY> [<MANUAL-PAGES-DIRECTORY>]"
echo " e.g. $0 /usr/local/bin /usr/local/man"
exit 1
fi
bin_dst=$1
if [ $# -eq 2 -a ! -d "$2" ]; then
echo "Warning: $2 is not a directory; not installing manual pages"
elif [ ! -d "$2/man1" ]; then
echo "Warning: directory $2/man1 not found; not installing manual pages"
else
man_dst="$2/man1"
fi
for f in Xvnc/programs/Xserver/Xvnc vncviewer/vncviewer \
vncpasswd/vncpasswd vncconnect/vncconnect vncserver; do
# Installing binaries
if cmp -s $f $bin_dst/`basename $f`; then
echo "`basename $f` hasn't changed"
else
echo "Copying $f -> $bin_dst/`basename $f`"
cp -pf $f $bin_dst
chmod 0555 $bin_dst/`basename $f`
fi
# Installing man pages
if [ "$man_dst" != "" ]; then
if cmp -s $f.man $man_dst/`basename $f.man`; then
echo "`basename $f.man` hasn't changed"
else
echo "Copying $f.man -> $man_dst/`basename $f.1`"
cp -pf $f.man $man_dst/`basename $f.1`
chmod 0644 $man_dst/`basename $f.1`
fi
fi
done
|