mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Merge pull request #298 from ath3/checksum-cleanup
Remove unneeded check from checksum plugin
This commit is contained in:
commit
1e68309577
|
@ -15,7 +15,6 @@
|
||||||
selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
|
selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
|
||||||
resp=f
|
resp=f
|
||||||
chsum=md5
|
chsum=md5
|
||||||
ischksum=0
|
|
||||||
|
|
||||||
checksum_type()
|
checksum_type()
|
||||||
{
|
{
|
||||||
|
@ -49,16 +48,13 @@ else
|
||||||
for chks in md5 sha1 sha224 sha256 sha384 sha512
|
for chks in md5 sha1 sha224 sha256 sha384 sha512
|
||||||
do
|
do
|
||||||
if [ "$(echo "$1" | grep \.${chks}$)" ]; then
|
if [ "$(echo "$1" | grep \.${chks}$)" ]; then
|
||||||
ischksum=1
|
|
||||||
${chks}sum -c < "$1"
|
${chks}sum -c < "$1"
|
||||||
read
|
read
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ $ischksum -eq 0 ]; then
|
checksum_type
|
||||||
checksum_type
|
file=$(basename "$1").$chsum
|
||||||
file=$(basename "$1").$chsum
|
${chsum}sum "$1" > "$file"
|
||||||
${chsum}sum "$1" > "$file"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue