Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
tools
xz
Commits
119d3ce1d749
Commit
119d3ce1d749
authored
4 years ago
by
Lasse Collin
Browse files
Options
Downloads
Patches
Plain Diff
Scripts: Add zstd support to xzdiff.
parent
3cb6bcc5ecde
Branches
master
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/scripts/xzdiff.1
+4
-2
4 additions, 2 deletions
src/scripts/xzdiff.1
src/scripts/xzdiff.in
+11
-5
11 additions, 5 deletions
src/scripts/xzdiff.in
with
15 additions
and
7 deletions
src/scripts/xzdiff.1
+
4
−
2
View file @
119d3ce1
...
...
@@ -6,7 +6,7 @@
.\"
.\" License: GNU GPLv2+
.\"
.TH XZDIFF 1 "20
1
1-0
3
-1
9
" "Tukaani" "XZ Utils"
.TH XZDIFF 1 "20
2
1-0
1
-1
1
" "Tukaani" "XZ Utils"
.SH NAME
xzcmp, xzdiff, lzcmp, lzdiff \- compare compressed files
.SH SYNOPSIS
...
...
@@ -34,4 +34,5 @@
.BR lzma (1),
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
or
...
...
@@ -37,5 +38,5 @@
or
.BR
lzop
(1).
.BR
zstd
(1).
All options specified are passed directly to
.BR cmp (1)
or
...
...
@@ -68,6 +69,7 @@
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
.BR zstd (1),
.BR zdiff (1)
.SH BUGS
Messages from the
...
...
This diff is collapsed.
Click to expand it.
src/scripts/xzdiff.in
+
11
−
5
View file @
119d3ce1
...
...
@@ -80,8 +80,10 @@
xz1=gzip;;
*[-.]lzo | *.tzo)
xz1=lzop;;
*[-.]zst | *.tzst)
xz1='zstd -q';;
*)
echo >&2 "$0: $1: Unknown compressed file name suffix"
exit 2;;
esac
case $1 in
...
...
@@ -83,13 +85,13 @@
*)
echo >&2 "$0: $1: Unknown compressed file name suffix"
exit 2;;
esac
case $1 in
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lzo)
FILE=`expr "X$1" : 'X\(.*\)[-.][abglmoxzZ2]*$'`;;
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lzo
| *[-.]zst
)
FILE=`expr "X$1" : 'X\(.*\)[-.][abglmo
st
xzZ2]*$'`;;
*.t[abglx]z)
FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;;
*.tbz2)
FILE=`expr "X$1" : 'X\(.*[-.]t\)bz2$'`ar;;
*.tzo)
FILE=`expr "X$1" : 'X\(.*[-.]t\)zo$'`ar;;
...
...
@@ -90,9 +92,11 @@
*.t[abglx]z)
FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;;
*.tbz2)
FILE=`expr "X$1" : 'X\(.*[-.]t\)bz2$'`ar;;
*.tzo)
FILE=`expr "X$1" : 'X\(.*[-.]t\)zo$'`ar;;
*.tzst)
FILE=`expr "X$1" : 'X\(.*[-.]t\)zst$'`ar;;
esac
xz_status=$(
exec 4>&1
...
...
@@ -103,8 +107,9 @@
*[-.]bz2 | *.tbz | *.tbz2) xz1=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=gzip;;
*[-.]lzo | *.tzo) xz1=lzop;;
*[-.]zst | *.tzst) xz1='zstd -q';;
esac
case $2 in
*[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
*[-.]lzo | *.tzo) xz2=lzop;;
...
...
@@ -106,7 +111,8 @@
esac
case $2 in
*[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
*[-.]lzo | *.tzo) xz2=lzop;;
*[-.]zst | *.tzst) xz2='zstd -q';;
esac
case $1 in
...
...
@@ -111,4 +117,4 @@
esac
case $1 in
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | -)
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo |
*[-.]zst | *.tzst |
-)
case "$2" in
...
...
@@ -114,5 +120,5 @@
case "$2" in
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | -)
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo |
*[-.]zst | *.tzst |
-)
if test "$1$2" = --; then
xz_status=$(
exec 4>&1
...
...
@@ -176,7 +182,7 @@
esac;;
*)
case "$2" in
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | -)
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo |
*[-.]zst | *.tzst |
-)
xz_status=$(
exec 4>&1
($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- |
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment