Set the patch paths relative to the script, not the cwd.
This way, we can run the script from everywhere.
This commit is contained in:
parent
1e97beeafb
commit
c8e7610ca9
|
@ -16,6 +16,7 @@ REMOTE_PREFIX = 'http://download.kiwix.org/dev/'
|
||||||
SOURCE_DIR = pj(os.getcwd(), "SOURCE")
|
SOURCE_DIR = pj(os.getcwd(), "SOURCE")
|
||||||
ARCHIVE_DIR = pj(os.getcwd(), "ARCHIVE")
|
ARCHIVE_DIR = pj(os.getcwd(), "ARCHIVE")
|
||||||
|
|
||||||
|
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
##### UTILS
|
##### UTILS
|
||||||
|
@ -175,7 +176,7 @@ class ReleaseDownloadMixin:
|
||||||
def _patch(self, log):
|
def _patch(self, log):
|
||||||
if not hasattr(self, 'patch'):
|
if not hasattr(self, 'patch'):
|
||||||
raise SkipCommand()
|
raise SkipCommand()
|
||||||
with open(pj('patches', self.patch), 'r') as patch_input:
|
with open(pj(SCRIPT_DIR, 'patches', self.patch), 'r') as patch_input:
|
||||||
run_command("patch -p1", self.source_path, log, input=patch_input)
|
run_command("patch -p1", self.source_path, log, input=patch_input)
|
||||||
|
|
||||||
def prepare(self, options):
|
def prepare(self, options):
|
||||||
|
|
Loading…
Reference in New Issue