3 # install.sh [--uninstall] sourcefile targetfile [install options]
7 # Check for uninstall option
8 if test "x$1" == "x--uninstall" ; then
21 if test -z "$SOURCE" ||
test -z "$TARGET" ; then
22 echo Usage
: install.sh
[--uninstall] source target
[install options
] >&2
28 # do_install(SOURCE_FILE, TARGET_FILE)
37 install -p -D $PARAMS $SOURCE $TARGET
42 # do_uninstall(SOURCE_FILE, TARGET_FILE)
51 if test -r $TARGET ; then
52 # Is target of the same version as this package?
53 if diff $SOURCE $TARGET >/dev
/null
; then
56 echo WARNING
: Skipping uninstall
for $TARGET - versions differ
! >&2
59 echo WARNING
: Skipping uninstall
for $TARGET - not installed
! >&2
66 do_uninstall
$SOURCE $TARGET
68 do_install
$SOURCE $TARGET "$*"