summaryrefslogtreecommitdiff
path: root/libre/mc-libre/unar.in
diff options
context:
space:
mode:
Diffstat (limited to 'libre/mc-libre/unar.in')
-rw-r--r--libre/mc-libre/unar.in64
1 files changed, 0 insertions, 64 deletions
diff --git a/libre/mc-libre/unar.in b/libre/mc-libre/unar.in
deleted file mode 100644
index 3ba37b019..000000000
--- a/libre/mc-libre/unar.in
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-
-UNAR=`which unar 2>/dev/null`
-
-# Define $UNAR version
-UNAR_VERSION=`$UNAR -v`
-
-mcunar4fs_list ()
-{
- $UNAR -q "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
-BEGIN { flag=0 }
-/^-------/ { flag++; if (flag > 1) exit 0; next }
-flag==1 {
- str = substr($0, 2)
- getline
- split($4, a, "-")
- if (index($6, "D") != 0)
- $6="drwxr-xr-x"
- else
- if (index($6, ".") != 0)
- $6="-rw-r--r--"
- printf "%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n", $6, uid, gid, $1, a[2], a[1], a[3], $5, str
-}'
-}
-
-mcunarfs_list ()
-{
- $UNAR -q "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
-BEGIN { flag=0 }
-/^-----------/ { flag++; if (flag > 1) exit 0; next }
-flag==1 {
- split($5, a, "-")
- if (index($1, "D") != 0)
- $1="drwxr-xr-x"
- else
- if (index($1, ".") != 0)
- $1="-rw-r--r--"
- printf "%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n", $1, uid, gid, $2, a[2], a[1], a[3], $6, $8
-}'
-}
-
-mcunarfs_list ()
-{
- mcunarfs_list "$@"
-}
-
-mcunarfs_copyout ()
-{
- $UNAR -q "$1" "$2" > "$3"
-}
-
-umask 077
-
-cmd="$1"
-shift
-
-case "$cmd" in
- # Workaround for a bug in mc - directories must precede files to
- # avoid duplicate entries, so we sort output by filenames
- list) mcunarfs_list "$@" | sort -k 8 ;;
- copyout) mcunarfs_copyout "$@" ;;
- *) exit 1 ;;
-esac
-exit 0