This commit is contained in:
Kovid Goyal 2009-10-08 23:13:10 -06:00
parent 1d823ba705
commit dfe6c1208a
2 changed files with 12 additions and 10 deletions

View File

@ -11,7 +11,7 @@ from distutils.spawn import find_executable
from PyQt4 import pyqtconfig from PyQt4 import pyqtconfig
from setup import isosx, iswindows from setup import isosx, iswindows, islinux
OSX_SDK = '/Developer/SDKs/MacOSX10.5.sdk' OSX_SDK = '/Developer/SDKs/MacOSX10.5.sdk'
if not os.path.exists(OSX_SDK): if not os.path.exists(OSX_SDK):
@ -213,12 +213,15 @@ def get_ip_address(ifname):
)[20:24]) )[20:24])
try: try:
HOST=get_ip_address('eth0') if islinux:
HOST=get_ip_address('eth0')
else:
HOST='192.168.1.2'
except: except:
try: try:
HOST=get_ip_address('wlan0') HOST=get_ip_address('wlan0')
except: except:
HOST='unknown' HOST='192.168.1.2'
PROJECT=os.path.basename(os.path.abspath('.')) PROJECT=os.path.basename(os.path.abspath('.'))

View File

@ -19,12 +19,12 @@ class Rsync(Command):
'--exclude src/calibre/manual --exclude src/calibre/trac ' '--exclude src/calibre/manual --exclude src/calibre/trac '
'--exclude .bzr --exclude .build --exclude .svn --exclude build --exclude dist ' '--exclude .bzr --exclude .build --exclude .svn --exclude build --exclude dist '
'--exclude "*.pyc" --exclude "*.pyo" --exclude "*.swp" --exclude "*.swo" ' '--exclude "*.pyc" --exclude "*.pyo" --exclude "*.swp" --exclude "*.swo" '
'rsync://{host}/work/{project} . ') 'rsync://{host}/work/{project} ..')
def run(self, opts): def run(self, opts):
cmd = self.SYNC_CMD.format(host=HOST, project=PROJECT) cmd = self.SYNC_CMD.format(host=HOST, project=PROJECT)
self.info(self.SYNC_CMD) self.info(cmd)
subprocess.check_call(self.SYNC_CMD, shell=True) subprocess.check_call(cmd, shell=True)
class VMInstaller(Command): class VMInstaller(Command):
@ -41,10 +41,9 @@ class VMInstaller(Command):
BUILD_CMD = 'ssh -t %s bash build-calibre' BUILD_CMD = 'ssh -t %s bash build-calibre'
BUILD_PREFIX = ['#!/bin/bash', 'export CALIBRE_BUILDBOT=1'] BUILD_PREFIX = ['#!/bin/bash', 'export CALIBRE_BUILDBOT=1']
BUILD_RSYNC = [r'cd ~/build', Rsync.SYNC_CMD] BUILD_RSYNC = [r'cd ~/build/{project}', Rsync.SYNC_CMD]
BUILD_CLEAN = ['cd ~/build/{project} ', BUILD_CLEAN = ['rm -rf dist/* build/* src/calibre/plugins/*']
'rm -rf dist/* build/* src/calibre/plugins/*'] BUILD_BUILD = ['python setup.py build',]
BUILD_BUILD = ['python setup.py build',]
def add_options(self, parser): def add_options(self, parser):
if not parser.has_option('--dont-shutdown'): if not parser.has_option('--dont-shutdown'):