3 # install.sh [--uninstall] sourcefile targetfile
7 # Check for uninstall option
8 if test "x$1" == "x--uninstall" ; then
19 if test -z "$SOURCE" ||
test -z "$TARGET" ; then
20 echo Usage
: install.sh
[--uninstall] source target
>&2
26 # do_install(SOURCE_FILE, TARGET_FILE)
34 install -D $SOURCE $TARGET
39 # do_uninstall(SOURCE_FILE, TARGET_FILE)
48 if test -r $TARGET ; then
49 # Is target of the same version as this package?
50 if diff $SOURCE $TARGET >/dev
/null
; then
53 echo WARNING
: Skipping uninstall
for $TARGET - versions differ
! >&2
56 echo WARNING
: Skipping uninstall
for $TARGET - not installed
! >&2
63 do_uninstall
$SOURCE $TARGET
65 do_install
$SOURCE $TARGET