You are not logged in.

#1 2017-03-26 13:49:48

look997
Member
Registered: 2017-03-18
Posts: 8

p7zip bash script from debian pack - gzip-like CLI wrapper for p7zip

Debian pack of p7zip   contain a /usr/bin/p7zip file, which is bash script, named "gzip-like CLI wrapper for p7zip":

#!/bin/bash
# gzip-like CLI wrapper for p7zip
set -e

compress=true
file=

usage ()
  {
    echo "Usage: $0 [-d] [-h|--help] [file]"
    echo ""
    echo "    -h print this help"
    echo "    -d decompress file"
    echo ""
    exit 1
  }

while [ "$#" != "0" ] ; do
  case "$1" in
    -d) compress=false ;; # decompressing
    -c) echo "$0: ignoring $1 option (not yet implemented)" ;;
    -h|--help|-*) usage ;;
    *)
      if [ "${file}" = "" ] ; then
        file="$1"
      else
        usage
      fi
    ;;
  esac
  shift
done

# make sure they're present, before we screw up
for i in mktemp 7zr rm cat tty ; do
  if ! which $i > /dev/null ; then
    echo "$0: $i: command not found"
    exit 1
  fi
done

if [ "${file}" != "" ] ; then
  if ${compress} ; then
    7zr a "${file}.7z" "${file}"
    exec rm "${file}"
  else
    case "${file}" in
      *.7z)
        7zr x "${file}"
        exec rm "${file}"
      ;;
      *)
        echo "$0: ${file}: unknown suffix -- ignored"
        exit 0
      ;;
    esac
  fi
fi

tmp=`mktemp`
trap "rm -f ${tmp}" 0

if ${compress} ; then
  if tty -s <&1 >/dev/null ; then
    echo "$0: compressed data not written to a terminal."
    echo "For help, type: $0 -h"
    exit 1
  fi
  rm -f ${tmp}
  7zr a ${tmp} -si >/dev/null
  cat ${tmp}
else
  cat > ${tmp}
  7zr x ${tmp} -so 2>/dev/null | cat
fi

exec rm -f ${tmp}

This script for additional switches:
http://webcache.googleusercontent.com/s … =1&vwsrc=0

Other than here:
https://linux.die.net/man/1/7z

Sometimes someone can use it.

Would it be better to change this package?:
https://www.archlinux.org/packages/extra/x86_64/p7zip/

Is it better to add Troubleshooting to the wiki, which informs about this difference and instructs how to add this script?:
https://wiki.archlinux.org/index.php/P7zip

Offline

#2 2017-03-26 13:58:13

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: p7zip bash script from debian pack - gzip-like CLI wrapper for p7zip

Arch doesn't patch packages, it ships them as upstream intends. Our package won't get patched and there's nothing to troubleshoot.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-03-26 17:58:22

look997
Member
Registered: 2017-03-18
Posts: 8

Re: p7zip bash script from debian pack - gzip-like CLI wrapper for p7zip

slithery wrote:

Arch doesn't patch packages, it ships them as upstream intends. Our package won't get patched and there's nothing to troubleshoot.

Sapi4linux uses debian p7zip. (Gzip-like composition).
Because of this he does not work on Arch.

Did you just submit this bug to the p7zip package?

Offline

#4 2017-03-26 18:01:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: p7zip bash script from debian pack - gzip-like CLI wrapper for p7zip

This isn't a bug with Arch. And this isn't something to add to the wiki.

If someone wants to add the package to the AUR, they will work out how to unzip it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-03-26 18:03:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: p7zip bash script from debian pack - gzip-like CLI wrapper for p7zip

look997 wrote:
slithery wrote:

Arch doesn't patch packages, it ships them as upstream intends. Our package won't get patched and there's nothing to troubleshoot.

Sapi4linux uses debian p7zip. (Gzip-like composition).
Because of this he does not work on Arch.

Did you just submit this bug to the p7zip package?

That's a Sapi4linux problem, not an Arch problem. Depending on something so distro-specific is irresponsible at best.

Offline

Board footer

Powered by FluxBB