lib/Tools/install
changeset 15733 75b9219980d3
parent 15574 b1d1b5bfc464
child 15848 3001067227af
     1.1 --- a/lib/Tools/install	Thu Apr 14 17:57:23 2005 +0200
     1.2 +++ b/lib/Tools/install	Thu Apr 14 19:16:07 2005 +0200
     1.3 @@ -16,6 +16,9 @@
     1.4    echo "  Options are:"
     1.5    echo "    -d DISTDIR   refer to DISTDIR as Isabelle distribution"
     1.6    echo "                 (default ISABELLE_HOME)"
     1.7 +  echo "    -a RDISTDIR  refer to RDISTDIR as Isabelle distribution"
     1.8 +  echo "                 in installed files, for packaging scripts"
     1.9 +  echo "                 (default to same value as -d)"
    1.10    echo "    -k VERSION   install KDE application icon on desktop"
    1.11    echo "                 (for KDE VERSION 1 or 2)"
    1.12    echo "    -p DIR       install standalone binaries in DIR"
    1.13 @@ -42,8 +45,9 @@
    1.14  DISTDIR="$ISABELLE_HOME"
    1.15  KDE=""
    1.16  BINDIR=""
    1.17 +RDISTDIR=""
    1.18  
    1.19 -while getopts "d:k:p:" OPT
    1.20 +while getopts "d:k:p:a:" OPT
    1.21  do
    1.22    case "$OPT" in
    1.23      d)
    1.24 @@ -58,6 +62,10 @@
    1.25        BINDIR="$OPTARG"
    1.26        NO_OPTS=""
    1.27        ;;
    1.28 +    a)
    1.29 +      RDISTDIR="$OPTARG"
    1.30 +      NO_OPTS=""
    1.31 +      ;;
    1.32      \?)
    1.33        usage
    1.34        ;;
    1.35 @@ -71,6 +79,9 @@
    1.36  
    1.37  [ "$#" -ne 0 -o -n "$NO_OPTS" ] && usage
    1.38  
    1.39 +if [ -z "$RDISTDIR" ]; then
    1.40 +  RDISTDIR=$DISTDIR
    1.41 +fi
    1.42  
    1.43  ## main
    1.44  
    1.45 @@ -97,7 +108,7 @@
    1.46    for NAME in isatool isabelle-process isabelle-interface
    1.47    do
    1.48      BIN="$BINDIR/$NAME"
    1.49 -    DIST="$DISTDIR/bin/$NAME"
    1.50 +    DIST="$RDISTDIR/bin/$NAME"
    1.51      echo "installing $BIN"
    1.52      echo "#!$BASH" > "$BIN" || fail "Cannot write file: $BIN"
    1.53      echo >> "$BIN"
    1.54 @@ -145,7 +156,7 @@
    1.55    echo "# KDE Config File" > "$KDEAPP" || fail "Cannot write file: $KDEAPP"
    1.56    echo "[KDE Desktop Entry]" >> "$KDEAPP"
    1.57    echo "Type=Application" >> "$KDEAPP"
    1.58 -  echo "Exec=\"$DISTDIR/bin/isabelle-interface\" %f" >> "$KDEAPP"
    1.59 +  echo "Exec=\"$RDISTDIR/bin/isabelle-interface\" %f" >> "$KDEAPP"
    1.60    echo "Icon=isabelle.xpm" >> "$KDEAPP"
    1.61    echo "TerminalOptions=" >> "$KDEAPP"
    1.62    echo "Path=" >> "$KDEAPP"