projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b3ce44
)
zshrc: make sure simple-extract() returns according return code when download of...
author
Michael Prokop
<mika@grml.org>
Thu, 21 Jul 2011 16:12:06 +0000
(18:12 +0200)
committer
Michael Prokop
<mika@grml.org>
Thu, 21 Jul 2011 16:19:30 +0000
(18:19 +0200)
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
9cdb7d2
..
b56cd09
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-3741,6
+3741,7
@@
selhist() {
}
# Usage: simple-extract <file>
}
# Usage: simple-extract <file>
+# Using option -d deletes the original archive file.
#f5# Smart archive extractor
simple-extract() {
emulate -L zsh
#f5# Smart archive extractor
simple-extract() {
emulate -L zsh
@@
-3818,7
+3819,7
@@
simple-extract() {
esac
if ! check_com ${DECOMP_CMD[(w)1]}; then
esac
if ! check_com ${DECOMP_CMD[(w)1]}; then
- echo "ERROR: ${DECOMP_CMD[(w)1]} not installed
!
" >&2
+ echo "ERROR: ${DECOMP_CMD[(w)1]} not installed
.
" >&2
RC=$((RC+2))
continue
fi
RC=$((RC+2))
continue
fi
@@
-3856,8
+3857,10
@@
simple-extract() {
if $USES_STDIN; then
if $USES_STDOUT; then
${=WGET_CMD} "$ARCHIVE" | ${=DECOMP_CMD} > $GZTARGET
if $USES_STDIN; then
if $USES_STDOUT; then
${=WGET_CMD} "$ARCHIVE" | ${=DECOMP_CMD} > $GZTARGET
+ RC=$((RC+$?))
else
${=WGET_CMD} "$ARCHIVE" | ${=DECOMP_CMD}
else
${=WGET_CMD} "$ARCHIVE" | ${=DECOMP_CMD}
+ RC=$((RC+$?))
fi
else
if $USES_STDOUT; then
fi
else
if $USES_STDOUT; then
@@
-3868,7
+3871,7
@@
simple-extract() {
fi
else
fi
else
- print "ERROR: '$ARCHIVE' is neither a valid file nor a supported URI" >&2
+ print "ERROR: '$ARCHIVE' is neither a valid file nor a supported URI
.
" >&2
RC=$((RC+8))
fi
done
RC=$((RC+8))
fi
done