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 scripts/checkpatch.pl: fix README.md file name after rename 2020-08-02 15:51:39 +02:00
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 scripts: download.pl: fix indentation 2020-09-11 17:35:19 +02:00
dump-target-info.pl scripts: Add Buildbot dump-target-info.pl script 2020-08-04 09:28:39 +02:00
env scripts/env: Fix 56f813674a scripts/env: use command -v instead of which 2020-07-12 13:29:28 +01:00
ext-toolchain.sh
feeds
fixup-makefile.pl
functions.sh
gen-dependencies.sh
gen_image_generic.sh scripts/gen_image_generic.sh: fix more shellcheck warnings 2020-07-11 14:42:32 +02:00
get_source_date_epoch.sh build: get_source_date_epoch allow external repos 2020-08-31 11:18:06 +01:00
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 build: store default/device packages in JSON 2020-06-30 23:21:10 +01:00
json_overview_image_info.py build,json: fix compatibility with Python 3.5 2020-07-13 22:45:04 +02:00
kconfig.pl
linksys-image.sh
make-ipkg-dir.sh
md5sum
metadata.pm build: add option to mark devices as BROKEN 2020-07-30 21:49:07 +02:00
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