summaryrefslogtreecommitdiffstats
path: root/lib/archive
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-02-16 11:31:22 (EST)
committer P. J. McDermott <pjm@nac.net>2012-02-16 11:31:22 (EST)
commit5c0d73506427282cb01ae5e43909a94a8c8868ed (patch)
tree5fb2fc96e8e24a478f77d132194e83fd3295e8e3 /lib/archive
parent6c3b5042da7341afc94b03098b508f36653eedce (diff)
Fix archived file listing.
Diffstat (limited to 'lib/archive')
-rw-r--r--lib/archive6
1 files changed, 3 insertions, 3 deletions
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