1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 05:18:14 +02:00
openwrt/scripts
Paul Spooren fcd3e13779 scripts: mkhash fail on hashing a folder
mkhash currently returns the hash of an empty input when trying to hash
a folder. This can be missleading in caseswhere e.g. an env variable is
undefined which should contain a filename. `mkhash ./path/to/$FILE`
would exit with code 0 and return a legit looking checksum.

A better behaviour would be to fail with exit code 1, which imitates the
behaviour of `md5sum` and `sha256sum`.

To avoid hashing of folders the `stat()` is checked.

Hashing empty inputs result in the following checksums:
md5: d41d8cd98f00b204e9800998ecf8427e
sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-11-09 10:54:29 +00:00
..
config scripts: update SPDX license names 2020-09-22 20:36:04 +02:00
flashing
arm-magic.sh
brcmImage.pl
bundle-libraries.sh scripts: bundle-libraries.sh: fix broken SDK compiler 2020-11-02 08:39:49 +01:00
cfe-bin-header.py
cfe-partition-tag.py
cfe-wfi-tag.py
checkpatch.pl
clang-gcc-wrapper
clean-package.sh
cleanfile
cleanpatch
combined-ext-image.sh
combined-image.sh
config.guess
config.rpath
config.sub
deptest.sh
diffconfig.sh
dl_cleanup.py
dl_github_archive.py
download.pl
dump-target-info.pl
env
ext-toolchain.sh
feeds
fixup-makefile.pl
functions.sh
gen_image_generic.sh
gen-dependencies.sh
get_source_date_epoch.sh
getver.sh scripts/getver.sh: silence rev-list errors 2020-11-02 08:39:49 +01:00
ipkg-build scripts: ipkg-build: simplify uid/gid resolving 2020-09-14 17:11:04 +02:00
ipkg-make-index.sh
ipkg-remove
json_add_image_info.py
json_overview_image_info.py
kconfig.pl
linksys-image.sh
make-ipkg-dir.sh
md5sum
metadata.pm
mkhash.c scripts: mkhash fail on hashing a folder 2020-11-09 10:54:29 +00:00
mkits-qsdk-ipq-image.sh
mkits.sh scripts: mkits.sh make it possible to specify fdt@# 2020-09-25 19:32:33 +02:00
om-fwupgradecfg-gen.sh
package-metadata.pl
pad_image
patch-kernel.sh
patch-specs.sh
portable_date.sh
qemustart scripts/qemustart: update malta to use MIPS64 R2 cpu 2020-10-11 16:16:24 +02:00
redboot-script.pl
relink-lib.sh
remote-gdb
rstrip.sh
sercomm-crypto.py
sercomm-partition-tag.py
sercomm-payload.py
sign_images.sh
slugimage.pl
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh
target-metadata.pl build: define PWM_SUPPORT arch feature flag 2020-09-25 19:32:33 +02:00
time.pl
timestamp.pl
ubinize-image.sh