I get your point. Flexibility has many advantages over automation. I was just thinking there has been a lot of good work by Florian, jls_legalize and you on this subject. Putting all three of your contributions together would be great. I would do it but I'm not up to your level yet.
from Florian
#!/bin/sh
# computes a md5sum of the tce/tcz extension file passed as a parameter,
# and compares it with the md5 checksum stored on the online repository.
# this for instance allows to detect if a new version of an extension
# is available.
MD5=/tmp/$(basename $0)_$$.md5
clean() { rm -f $MD5 $MD5.server 2>/dev/null ; }
die() { echo "$1"; clean; exit 1; }
. /etc/init.d/tc-functions
[ $# = 1 ] || die "Usage: $(basename $0) EXTENSION"
[ -f "$1" ] || die "$1: no such file"
MIRROR=`awk '/Mirror/ {print $2}' /opt/.tcrc`
PROTOCOL=`awk '/Protocol/ {print $2}' /opt/.tcrc`
stringinstring .tce "$1" && REPO="tce"
stringinstring .tcz "$1" && REPO="tcz"
[ -z $REPO ] && die "$1: not a tce or tcz extension file"
URL="$PROTOCOL"://"$MIRROR"/"$REPO"/"$1"
trap clean SIGHUP SIGINT SIGTERM
md5sum "$1" > $MD5
wget -q "$URL.md5.txt" -O $MD5.server || die "can't fetch checksum from server"
diff $MD5 $MD5.server > /dev/null || die "differs from server"
clean
jls_legalize
"if u launch this script from a dir containg extensions and u save the script made above by florian tce-chk.sh
my script elencates at the end all the extensions that are not up to date."
#!/bin/sh
#controlla se tutte le estensioni presenti directory corrente sono aggiornate
#checks if all the extensions in the current dir are uptodate
#jls_legalze unsenepopiu at tin dot it
FILETMP=`mktemp`
for FILE in *; do
if [ -f $FILE ]; then
estensione=${FILE##*.}
if [ $estensione = tce ] || [ $estensione = tcz ] || [ $estensione = tcel ] || [ $estensione = tczl ] || [ $estensione = tcem ] || [ $estensione = tczm ] || [ $estensione = tcelm ] || [ $estensione = tczlm ]; then
if [ `tce-chk.sh $FILE` ]; then
echo "ok"
else
echo "errori:"
echo $FILE >> $FILETMP
fi
fi
fi
done