Zine

open source content publishing system


Changeset 711:7eae2cba8191


Ignore:
Timestamp:
12/24/08 13:52:56 (3 years ago)
Author:
mitsuhiko
Branch:
default
Message:

New installer for POSIX

Files:
1 added
1 deleted
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • Makefile.in

    r700 r711  
    88 
    99install: 
    10         @(PREFIX=$(PREFIX) PYTHON=$(PYTHON) ./scripts/install-posix) 
     10        @($(PYTHON) scripts/install-posix $(PREFIX)) 
    1111 
    1212uninstall: 
    13         @(PREFIX=$(PREFIX) ./scripts/uninstall-posix) 
     13        @(PREFIX=$(PREFIX) /bin/sh ./scripts/_uninstall-posix.sh) 
  • scripts/_uninstall-posix.sh

    • Property exe deleted
  • scripts/create-package

    r706 r711  
    4040 
    4141 
    42 def find_files(): 
     42def find_files(force): 
    4343    allowed_states = frozenset('CI?') 
    4444    client = subprocess.Popen(['hg', 'status', '-A'], stdout=subprocess.PIPE) 
     
    4848            continue 
    4949        status, filename = line 
    50         if status not in allowed_states: 
     50        if not force and status not in allowed_states: 
    5151            raise BuildError('hg unclean. Uncommited modifications?') 
    5252        if status == 'C' and not is_ignored(filename): 
     
    7171 
    7272 
    73 def build(dst_dir, build_dir, formats): 
     73def build(dst_dir, build_dir, options): 
    7474    zine_version = get_zine_version() 
    7575    release_name = 'Zine-%s' % '-'.join(zine_version.split()) 
     
    8484    # copy all tracked files into the build dir 
    8585    print 'Bootstrapping build directory [%s]' % build_dir 
    86     for filename in find_files(): 
     86    for filename in find_files(options.force): 
    8787        target_folder = os.path.join(release_dir, os.path.dirname(filename)) 
    8888        if not os.path.exists(target_folder): 
     
    124124    try: 
    125125        os.chdir(build_dir) 
    126         if formats.tar: 
     126        if options.tar: 
    127127            tarball_filename = archive_base + '.tar.gz' 
    128128            subprocess.call(['tar', 'vczf', tarball_filename, release_name]) 
    129129            messages.append('Created tarball in %s' % tarball_filename) 
    130         if formats.zip: 
     130        if options.zip: 
    131131            zip_filename = archive_base + '.zip' 
    132132            subprocess.call(['zip', '-r', zip_filename, release_name]) 
     
    147147    parser.add_option('--no-tar', dest='tar', action='store_false', 
    148148                      default=True, help='Do not generate a tarball') 
     149    parser.add_option('-f', '--force', dest='force', action='store_true', 
     150                      default=False, help='Force build, even if local ' 
     151                      'modifications exist.') 
    149152    options, args = parser.parse_args() 
    150153    if len(args) != 1: 
Note: See TracChangeset for help on using the changeset viewer.