diff bin/putcrc @ 79:08d5f6023998

Replace checksum calculator with python version.
author Edho Prima Arief <me@myconan.net>
date Sat, 09 Jul 2011 15:33:37 +0700
parents 94ee419ad047
children
line wrap: on
line diff
--- a/bin/putcrc	Sun Jun 19 12:53:42 2011 +0700
+++ b/bin/putcrc	Sat Jul 09 15:33:37 2011 +0700
@@ -24,7 +24,7 @@
 		dirname="$(dirname "$(safe_path "${file}")")"
 		myfile="$(printf "%s\n" "${filename%.*}" | sed -e 's/\([^]]\)$/\1 /')"
 		myext="${filename##*.}"; if [ "${myext}" = "${filename}" ]; then myext=""; else myext=".${myext}"; fi
-		crc=$(cek.rb "$(safe_path "${file}")" | tail -1 | sed -e 's/.*\([A-F0-9]\{8\}\)$/\1/')
+		crc=$(cek.py "$(safe_path "${file}")" | tail -1 | sed -e 's/.*\([A-F0-9]\{8\}\)$/\1/')
 		mv -- "${file}" "${dirname}/${myfile}[${crc}]${myext}" && printf "%s => %s\n" "${file}" "${myfile}[${crc}]${myext}"
 	else
 		printf "%s\n" "${file} is not a file or unreadable"