#!/bin/bash
cd /var/www/patcher
> crc.txt
> lista.txt
find update/ -type f | sort | while IFS= read -r f; do
    sha1=$(sha1sum "$f" | cut -d' ' -f1)
    rel="${f#update/}"
    echo "${rel},${sha1}" >> crc.txt
    echo "${rel}" >> lista.txt
done
echo "Generati $(wc -l < crc.txt) file."
