From 5c0d73506427282cb01ae5e43909a94a8c8868ed Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pjm@nac.net>
Date: Thu, 16 Feb 2012 11:31:22 -0500
Subject: Fix archived file listing.

---
(limited to 'lib/archive')

diff --git a/lib/archive b/lib/archive
index bdb9c11..d692b44 100644
--- a/lib/archive
+++ b/lib/archive
@@ -57,12 +57,12 @@ oh_archive_extract_source()
 	esac
 
 	_files=$(tar -t${_z}f ../${OH_SRCPKG}-${OH_PKGVER%-*}.tar.${_z_ext} | \
-		grep -v '^./$')
+		sed 's@^./@@' | grep '^[^/]*/$')
 
-	if [ -z "$(echo "${_files}" | grep '/$')" ]; then
+	if [ -z "${_files}" ]; then
 		return 4
 	fi
-	if [ "$(echo "${_files}" | grep '/$' | wc -l)" -ne 1 ]; then
+	if [ "$(echo "${_files}" | wc -l)" -ne 1 ]; then
 		return 5
 	fi
 
--
cgit v0.9.1