Explorar el Código

Remove unneeded check from checksum plugin

master
ath3 hace 5 años
padre
commit
c2fbdfdeb3
Se han modificado 1 ficheros con 3 adiciones y 7 borrados
  1. +3
    -7
      plugins/checksum

+ 3
- 7
plugins/checksum Ver fichero

@@ -15,7 +15,6 @@
selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
resp=f
chsum=md5
ischksum=0

checksum_type()
{
@@ -49,16 +48,13 @@ else
for chks in md5 sha1 sha224 sha256 sha384 sha512
do
if [ "$(echo "$1" | grep \.${chks}$)" ]; then
ischksum=1
${chks}sum -c < "$1"
read
exit
fi
done
if [ $ischksum -eq 0 ]; then
checksum_type
file=$(basename "$1").$chsum
${chsum}sum "$1" > "$file"
fi
checksum_type
file=$(basename "$1").$chsum
${chsum}sum "$1" > "$file"
fi
fi

Cargando…
Cancelar
Guardar