ckolivas / lrzip

Long Range Zip
http://lrzip.kolivas.org
GNU General Public License v2.0
618 stars 76 forks source link

lrztar shows spurious "illegal option" with long options #245

Open paddylandau opened 1 year ago

paddylandau commented 1 year ago

When using a long option with lrztar, it shows a spurious error. Long options are nevertheless accepted.

Example:

$ lrztar --zpaq --outfile=example.tar.lrz example/
/usr/bin/lrztar: illegal option -- -
/usr/bin/lrztar: line 66: ((: v_?=1: syntax error: operand expected (error token is "=1")
/usr/bin/lrztar: illegal option -- -
/usr/bin/lrztar: line 66: ((: v_?=4: syntax error: operand expected (error token is "=4")
Warning, low memory for chosen compression settings
Compression Ratio: 1.904. Average Compression Speed:  1.400MB/s.
Total time: 00:00:04.96

Despite the error messages, the long options are accepted and processed correctly.

Version 0.651

pete4abw commented 1 year ago

Ditch the = sign. The try again. lrztar is very complex. You can and possibly should use tar directly, as in: tar --use-compress-program | -I 'lrzip -options...' -cf outputfile.tar.lrz [directories or files to tar]. This wiki will help.

paddylandau commented 1 year ago

@pete4abw — Thank you. Ditching the = sign made no difference. But using tar with --use-compress-program worked perfectly, thank you!

pete4abw commented 1 year ago

@pete4abw — Thank you. Ditching the = sign made no difference. But using tar with --use-compress-program worked perfectly, thank you!

Been a while since I looked at lrztar. It only supports short options. The reason the long command worked as expected was the outfile command was passed to lrzip. I wrote a front-end script for lrzip and lrzip-next called lrzip-fe. It has most all commands available. You can check out the repo on github.

paddylandau commented 1 year ago

Been a while since I looked at lrztar. It only supports short options.

Ah, I've make a note of that.

I wrote a front-end script for lrzip and lrzip-next called lrzip-fe. It has most all commands available. You can check out the repo on github.

Sorry, I'm not familiar with github. I tried to find both lrzip-next and lrzip-fe but found neither. It doesn't matter, though, because I'm happy with what I have now, thank you.