Ignore:
Timestamp:
Jun 24, 2008, 4:09:36 PM (16 years ago)
Author:
ole
Message:

Allowed update_anuga_user_manual to work out path automatically using 'get_pathname_from_package'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/documentation/user_manual/update_anuga_user_manual.py

    r5051 r5422  
    3434
    3535from os import system, chdir
    36 from os.path import expanduser
    37 from anuga.utilities.system_tools import get_revision_number
     36from os.path import expanduser, split, join
     37from anuga.utilities.system_tools import get_revision_number, get_pathname_from_package
    3838from anuga.config import major_revision
    3939from sys import argv
    4040
     41# Determine absolute path for user manual
    4142
    42 anugapath = expanduser('~/inundation/anuga_core/documentation/user_manual')
     43# Path for ANUGA
     44anugapath = get_pathname_from_package('anuga')
     45
     46# Strip trailing source/anuga of path
     47basepath = split(split(anugapath)[0])[0]
     48
     49# Add local path to user_manual
     50docpath = join(join(basepath, 'documentation'), 'user_manual')
    4351texfiles = ['anuga_user_manual', 'anuga_installation_guide']
    4452
    45 chdir(anugapath) # Move to location of LaTeX files
     53print 'Moving to', docpath
     54chdir(docpath) # Move to location of LaTeX files
    4655system('svn update') # Update from svn
    4756
Note: See TracChangeset for help on using the changeset viewer.