codekingpro/portable-devtools
114k
1#!/bin/sh2# Compare the uncompressed contents of compressed files, byte by byte.3 4# Copyright (C) 2007, 2010-2025 Free Software Foundation, Inc.5 6# This program is free software; you can redistribute it and/or modify7# it under the terms of the GNU General Public License as published by8# the Free Software Foundation; either version 3 of the License, or9# (at your option) any later version.10 11# This program is distributed in the hope that it will be useful,12# but WITHOUT ANY WARRANTY; without even the implied warranty of13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# GNU General Public License for more details.15 16# You should have received a copy of the GNU General Public License17# along with this program. If not, see <https://www.gnu.org/licenses/>.18 19version="zcmp (gzip) 1.1420Copyright (C) 2025 Free Software Foundation, Inc.21This is free software. You may redistribute copies of it under the terms of22the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.23There is NO WARRANTY, to the extent permitted by law.24 25Written by Paul Eggert."26 27usage="Usage: $0 [OPTION]... FILE1 [FILE2]28Compare FILE1 to FILE2 byte by byte, using their uncompressed contents29if they are compressed. If FILE2 is omitted, compare FILE1 to the30uncompressed contents of FILE1.gz. Do comparisons like 'cmp' does.31 32Options are the same as for 'cmp'.33 34If a FILE is '-' or missing, read standard input.35 36Report bugs to <bug-gzip@gnu.org>."37 38case $1 in39--help) printf '%s\n' "$usage" || exit 2; exit;;40--version) printf '%s\n' "$version" || exit 2; exit;;41esac42 43exec zdiff --__cmp "$@"44 