projects
/
hvlinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56909c9
)
Fixed warning with tar and pipes
author
gobo72
<gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Thu, 28 Oct 2010 22:04:39 +0000
(22:04 +0000)
committer
gobo72
<gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Thu, 28 Oct 2010 22:04:39 +0000
(22:04 +0000)
functions
patch
|
blob
|
history
diff --git
a/functions
b/functions
index
2227332
..
3ca8396
100644
(file)
--- a/
functions
+++ b/
functions
@@
-545,7
+545,9
@@
static_decompressed_dirname()
tar.bz2|tar.gz|tgz|tar.Z)
# Remove optional "./" leading component with sed
# and extract base directory name with awk.
tar.bz2|tar.gz|tgz|tar.Z)
# Remove optional "./" leading component with sed
# and extract base directory name with awk.
- local DIRNAME=$(tar ${TAR_OPTS} -tf ${LFS_PKG_DIR}/${PACKAGE}.tar.bz2 | head -n1 | sed 's!^\./!!' | awk -F \/ '{print $1}')
+ # tar 1.23 reports an error when using pipes, so
+ # remove error message with "2> /dev/null"
+ local DIRNAME=$(tar ${TAR_OPTS} -tf ${LFS_PKG_DIR}/${PACKAGE}.tar.bz2 2> /dev/null | head -n1 | sed 's!^\./!!' | awk -F \/ '{print $1}')
echo ${DIRNAME}
;;
zip)
echo ${DIRNAME}
;;
zip)