lib/Tools/install
changeset 11125 b70c3c1b499f
parent 10555 2323ec838401
child 11127 e43723fff70c
     1.1 --- a/lib/Tools/install	Wed Feb 14 23:17:53 2001 +0100
     1.2 +++ b/lib/Tools/install	Wed Feb 14 23:18:47 2001 +0100
     1.3 @@ -17,7 +17,8 @@
     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 "    -k           install KDE application icon on Desktop"
     1.8 +  echo "    -k VERSION   install KDE application icon on desktop"
     1.9 +  echo "                 (for KDE VERSION 1 or 2)"
    1.10    echo "    -p DIR       install standalone binaries in DIR"
    1.11    echo
    1.12    echo "  Install Isabelle executables with absolute references to the current"
    1.13 @@ -43,7 +44,7 @@
    1.14  KDE=""
    1.15  BINDIR=""
    1.16  
    1.17 -while getopts "d:kp:" OPT
    1.18 +while getopts "d:k:p:" OPT
    1.19  do
    1.20    case "$OPT" in
    1.21      d)
    1.22 @@ -51,7 +52,7 @@
    1.23        NO_OPTS=""
    1.24        ;;
    1.25      k)
    1.26 -      KDE=true
    1.27 +      KDE="$OPTARG"
    1.28        NO_OPTS=""
    1.29        ;;
    1.30      p)
    1.31 @@ -107,13 +108,22 @@
    1.32  fi
    1.33  
    1.34  
    1.35 -# install KDE application icon
    1.36 +# install KDE 1.x / 2.x application icon
    1.37  
    1.38 -KDEHOME=~/.kde
    1.39 -KDEAPP=~/Desktop/Isabelle.kdelnk
    1.40 -KDEICONS="$KDEHOME/share/icons"
    1.41 +if [ -n "$KDE" ]; then
    1.42 +  if [ "$KDE" = 1 ]; then
    1.43 +    KDEHOME=~/.kde
    1.44 +    KDEDESKTOP=~/Desktop
    1.45 +    KDEAPP="$KDEDESKTOP/Isabelle.kdelnk"
    1.46 +  elif [ "$KDE" = 2 ]; then
    1.47 +    KDEHOME=~/.kde2
    1.48 +    KDEDESKTOP=~/KDesktop
    1.49 +    KDEAPP="$KDEDESKTOP/Isabelle.desktop"
    1.50 +  else
    1.51 +    fail "Unknown KDE version \"$KDE\""
    1.52 +  fi
    1.53  
    1.54 -if [ "$KDE" = true ]; then
    1.55 +  KDEICONS="$KDEHOME/share/icons"
    1.56    mkdir -p "$KDEICONS" || fail "Bad directory: $KDEICONS"
    1.57    mkdir -p "$KDEICONS/mini" || fail "Bad directory: $KDEICONS/mini"
    1.58  
    1.59 @@ -133,7 +143,4 @@
    1.60    echo "Path=" >> "$KDEAPP"
    1.61    echo "Terminal=0" >> "$KDEAPP"
    1.62    echo "Name=Isabelle" >> "$KDEAPP"
    1.63 -
    1.64 -  echo
    1.65 -  echo "Please refresh your KDE desktop now!"
    1.66  fi