[PC-BSD Commits] r7329 - pcbsd-projects/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Mon Aug 2 07:47:43 PDT 2010
Author: kris
Date: 2010-08-02 07:47:43 -0700 (Mon, 02 Aug 2010)
New Revision: 7329
Modified:
pcbsd-projects/pbi-manager/pbi-manager
Log:
Update to pbi-manager, when doing pbi_create, now test if "tar" supports -J for lzma compression, otherwise default back to -j for bzip2
Modified: pcbsd-projects/pbi-manager/pbi-manager
===================================================================
--- pcbsd-projects/pbi-manager/pbi-manager 2010-08-02 14:05:36 UTC (rev 7328)
+++ pcbsd-projects/pbi-manager/pbi-manager 2010-08-02 14:47:43 UTC (rev 7329)
@@ -1780,11 +1780,22 @@
fi
}
+# Check if tar supports lzma compression
+test_tar_lzma() {
+ touch /tmp/.pbilzma.$$ >/dev/null 2>/dev/null
+ tar cvJf /tmp/.pbilzma.tar.$$ /tmp/.pbilzma.$$ >/dev/null 2>/dev/null
+ _exitcode=$?
+ rm /tmp/.pbilzma.$$ >/dev/null 2>/dev/null
+ rm /tmp/.pbilzma.tar.$$ >/dev/null 2>/dev/null
+ return $_exitcode
+}
+
# Start creating the application archive
mk_archive_file() {
PBI_CREATE_ARCHIVE="${PBI_CREATE_OUTDIR}/.PBI.$$.tbz"
+ if test_tar_lzma ; then _tcmp="J" ; else _tcmp="j" ; fi
echo "Creating compressed archive..."
- tar cvJf "${PBI_CREATE_ARCHIVE}" -C ${PBI_STAGEDIR} . 2>/dev/null
+ tar cv${_tcmp}f "${PBI_CREATE_ARCHIVE}" -C ${PBI_STAGEDIR} . 2>/dev/null
}
# Start creating the header archive
More information about the Commits
mailing list