/[docman2]/migrate.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /migrate.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Wed Jun 11 02:54:44 2003 UTC revision 1.3 by dpavlin, Wed Jun 11 14:07:23 2003 UTC
# Line 8  Line 8 
8  dir=`pwd`  dir=`pwd`
9    
10  #  #
11    # try to guess docman installation directory from this script path
12    #
13    
14    D=`dirname "$0"`
15    docman2_dir="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`"
16    docman2_realm="$docman2_dir/realm"
17    
18    if [ ! -e "$docman2_realm" -o ! -e "$docman2_dir/docman.php" ] ; then
19            echo "FATAL: You should start this script using full path to"
20            echo "docman installation directory and not from some other"
21            echo "path!! (e.g. /home/httpd/docman2/`basename $0`)"
22            exit 1
23    fi
24    
25    #
26  # try to guess existing DirectoryIndex (docman.php)  # try to guess existing DirectoryIndex (docman.php)
27  #  #
28    
# Line 43  if [ ! -e "$dir/.docman.conf" ] ; then Line 58  if [ ! -e "$dir/.docman.conf" ] ; then
58  fi  fi
59    
60  #  #
61  # get some version numbers and dirs  # get some version numbers
62  #  #
63    
64  docman1_ver=`grep "gblVersion *=" $docman_php | cut -d\" -f2`  docman1_ver=`grep "gblVersion *=" $docman_php | cut -d\" -f2`
65  # convert dir to absolute path  # convert dir to absolute path
 D=`dirname "$0"`  
 docman2_dir="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`"  
66  docman2_ver=`grep "gblVersion *=" $docman2_dir/docman.php | cut -d\" -f2`  docman2_ver=`grep "gblVersion *=" $docman2_dir/docman.php | cut -d\" -f2`
67    
 docman2_realm="$docman2_dir/realm"  
   
68  #  #
69  # do some sanity checks  # do some sanity checks
70  #  #

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26