mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* extfs/uha.in: Strengthen quoting. Remove unnecessary space
after filename. Update URL. Use safer temporary directory.
This commit is contained in:
parent
c055823512
commit
5c038d2f12
@ -1,5 +1,8 @@
|
||||
2002-12-13 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* extfs/uha.in: Strengthen quoting. Remove unnecessary space
|
||||
after filename. Update URL. Use safer temporary directory.
|
||||
|
||||
* extfs/uarj: New list-only implementation that doesn't need
|
||||
patched unarj.
|
||||
* extfs/unarj.diff: Remove.
|
||||
|
@ -4,11 +4,11 @@
|
||||
# ver 0.1 Thu Apr 6 12:05:08 2000
|
||||
|
||||
HA=ha # for HA 0.999 Copyright (c) 1995 Harri Hirvola
|
||||
# Source: ftp://sunsite.unc.edu/pub/Linux/compress/ha0999p-linux.tar.gz
|
||||
# Source: ftp://ftp.ibiblio.org/pub/Linux/utils/compress/ha0999p-linux.tar.gz
|
||||
|
||||
mchafs_list ()
|
||||
{
|
||||
eval $HA lf $1 2>/dev/null |@AWK@ -v uid=${UID-0} '
|
||||
eval $HA lf "$1" 2>/dev/null |@AWK@ -v uid=${UID-0} '
|
||||
{ date="JanFebMarAprMayJunJulAugSepOctNovDec" }
|
||||
/^===========/ {next}
|
||||
{
|
||||
@ -22,22 +22,32 @@ mchafs_list ()
|
||||
path=$2
|
||||
getline
|
||||
if ($1~/^d.*/) next
|
||||
printf "%s %s %-8d %-8d %8d %3s %2d %4d %s:%s %s%s \n",\
|
||||
printf "%s %s %-8d %-8d %8d %3s %2d %4d %s:%s %s%s\n",\
|
||||
$1,1,0,0,filesize, substr(date,(a[2]-1)*3+1,3),a[3],a[1],t[1],t[2],\
|
||||
path,filename
|
||||
}
|
||||
}' 2>/dev/null
|
||||
}'
|
||||
}
|
||||
|
||||
mchafs_copyout ()
|
||||
{
|
||||
cd /tmp
|
||||
eval $HA xy $1 $2 >/dev/null 2>&1
|
||||
mv -f $2 $3
|
||||
TMPDIR="/tmp/mctmpdir-uha.$$"
|
||||
mkdir $TMPDIR || exit 1
|
||||
cd $TMPDIR
|
||||
|
||||
eval $HA xy "$1" "$2" >/dev/null 2>&1
|
||||
mv -f "$2" "$3"
|
||||
|
||||
cd /
|
||||
rm -rf $TMPDIR
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
list) shift; mchafs_list $1; exit 0;;
|
||||
copyout) shift; mchafs_copyout $1 $2 $3; exit 0;;
|
||||
cmd="$1"
|
||||
shift
|
||||
|
||||
case "$cmd" in
|
||||
list) mchafs_list "$@" ;;
|
||||
copyout) mchafs_copyout "$@" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
exit 1
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user