diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-06 16:55:35 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-06 16:55:35 -0500 |
commit | 317ab819612426664e8873043e084e022a77fbd6 (patch) | |
tree | 340ceeab475cc95476a2ec507bfb24299349395c /libre/mc-libre/unar.in | |
parent | fe11b3202f42438b286fed7452db4c95ff9c6d48 (diff) | |
parent | bc17340c07501e38eb75a85edbe864c6ba473cb4 (diff) | |
download | abslibre-317ab819612426664e8873043e084e022a77fbd6.tar.gz abslibre-317ab819612426664e8873043e084e022a77fbd6.tar.bz2 abslibre-317ab819612426664e8873043e084e022a77fbd6.zip |
Merge branch 'master' of https://projects.parabolagnulinux.org/abslibre
Diffstat (limited to 'libre/mc-libre/unar.in')
-rw-r--r-- | libre/mc-libre/unar.in | 64 |
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 |