diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/archive | 6 |
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 |