3 # Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
6 LIBRARIES
="@LIBRARIES@"
11 INCLUDE_DIR
="@INCLUDE_DIR@"
13 INSTALL_DIR
="@INSTALL_DIR@"
14 GAMBC_BIN_DIR
="$INSTALL_DIR/current/bin"
15 GAMBC_LIB_DIR
="$INSTALL_DIR/current/lib"
16 GAMBC_INCLUDE_DIR
="$INSTALL_DIR/current/include"
18 install_safely
() # dir, gambc_dir, files
30 if [ -e "$DIR/$f" ] ; then
31 if [ -L "$DIR/$f" -a "`readlink \"$DIR/$f\"`" == "$GAMBC_DIR/$f" ] ; then
32 EXISTING_CORRECT
="$EXISTING_CORRECT $f"
34 EXISTING_INCORRECT
="$EXISTING_INCORRECT $f"
42 for f
in $EXISTING_INCORRECT ; do
44 # This should not happen because the InstallationCheck script aborts
45 # the installation when an existing file would be clobbered.
46 # However for safety we save the file under a different name.
48 mv "$DIR/$f" "$DIR/$f-orig"
52 for f
in $EXISTING_INCORRECT $MISSING ; do
53 ln -s "$GAMBC_DIR/$f" "$DIR/$f"
57 install_safely
"$BIN_DIR" "$GAMBC_BIN_DIR" "$PROGRAMS"
58 install_safely
"$LIB_DIR" "$GAMBC_LIB_DIR" "$LIBRARIES"
59 install_safely
"$INCLUDE_DIR" "$GAMBC_INCLUDE_DIR" "$INCLUDES"