summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild_tools/bin/mp.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/build_tools/bin/mp.py b/build_tools/bin/mp.py
index 62f55a1..7744450 100755
--- a/build_tools/bin/mp.py
+++ b/build_tools/bin/mp.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python2
-# Version 0.6.8
+# Version 0.6.9
import os
import sys
@@ -32,6 +32,9 @@ pkgrel = ""
arch = ""
CARCH = ""
PKGDEST = ""
+TOTALPKG = ""
+GZPKG = ""
+XZPKG = ""
# See what git branch we're working under
git_repo = Git()
@@ -225,13 +228,18 @@ def update_repo():
for i in pkglist:
print "Package name:",i
- TOTALPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.gz"
- if not os.path.isfile(PKGDEST + "/" + TOTALPKG):
- TOTALPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.xz"
+
+ GZPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.gz"
+ XZPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.xz"
+ if os.path.isfile(PKGDEST + "/" + XZPKG):
+ TOTALPKG = XZPKG
+ elif os.path.isfile(PKGDEST + "/" + GZPKG):
+ TOTALPKG = GZPKG
else:
- print "ERROR in function update_repo: Couldn't find the new package ",TOTALPKG
+ print "ERROR in function update_repo: Couldn't find the new package",PKGDEST + "/" + TOTALPKG
sys.exit(2)
+ print "Package file:",TOTALPKG
# Remove old package(s) from local copy
pv = re.compile('[\d]+[\w.]+')
dirlist = os.listdir(DOCROOT)
@@ -390,7 +398,7 @@ def config_file():
SRCPKG = pkgbase + "-" + pkgver + "-" + pkgrel + ".src.tar.gz"
else:
SRCPKG = pkgname + "-" + pkgver + "-" + pkgrel + ".src.tar.gz"
- print "Source package will be: ",SRCPKG
+ print "Source package will be:",SRCPKG
# Get needed makepkg.conf variables
mpkg="/etc/makepkg.conf"
@@ -408,7 +416,7 @@ def config_file():
if mp_lines.strip().startswith("PKGDEST"):
PKGDEST = mp_lines.partition("=")[2].strip('\n')
print "CARCH is:",CARCH
- print "Package desitination is:",PKGDEST
+ print "Package destination is:",PKGDEST
print "Architecture is:",arch
def make_package():