Miscellaneous stuff for deco users
Extractor wrappers
- deco-diskimage is Zoë Stephenson’s collection of extractor wrappers for filesystem disk images.
A handy shell snippet
Add the following code to your POSIX-compatible shell’s initialization file, ~/.bashrc in the case of bash:
dcd()
{
while getopts ace:uv __dcd_x "$@" 2>/dev/null; do :; done
test $OPTIND = $# || { deco "$@"; return; }
__dcd_x=`deco "$@"; r=$?; echo .; exit $r`
__dcd_r=$?
__dcd_x=${__dcd_x%??}
test "$__dcd_x" != . && cat <<-EOF
$__dcd_x
EOF
case $__dcd_x in */) cd -- "$__dcd_x" && ls; esac
eval unset __dcd_x __dcd_r\; return $__dcd_r
}
You can then e. g. run dcd -u archive.tar to extract then unlink archive.tar and, if applicable, cd into (presumably) archive/ and call ls.
Note that deco 1.6 or later is needed for this to work.