From: Friedrich L. <fr...@us...> - 2006-05-25 23:44:19
|
Update of /cvsroot/devil-linux/build In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8497 Modified Files: Tag: rel-1-2-patches update_src Log Message: add option to only check md5sum's Index: update_src =================================================================== RCS file: /cvsroot/devil-linux/build/update_src,v retrieving revision 1.32.2.6 retrieving revision 1.32.2.7 diff -u -d -r1.32.2.6 -r1.32.2.7 --- update_src 5 May 2006 18:10:09 -0000 1.32.2.6 +++ update_src 25 May 2006 23:44:13 -0000 1.32.2.7 @@ -5,6 +5,7 @@ # then use the main server to just get the latest greatest stuff # +# the Devil-Linux Version VERSION="1.2" # the array holding the menu items @@ -20,6 +21,10 @@ # ftpd[x]="/...../sources/$VERSION/" - path to the sources # +# the "do md5sum only" menu entry + +menu[0]="Only check the md5sum's of the the source files" + # the main server menu[1]="Devil-Linux FTP-Server Luxembourg-Kirchberg" @@ -76,8 +81,12 @@ echo " use a mirror, then call update_src a second time" echo " using the main server to get the latest updates." echo - echo " Devil-Linux main download site:" - for ((i=1, j=1; i <= menuitems; i++, j++)); do + echo " Special function:" + for ((i=0, j=0; i <= menuitems; i++, j++)); do + if [ $i -eq 1 ]; then + echo + echo " Devil-Linux main download site:" + fi if [ $i = $j -a "${#menu[$i]}" -eq 0 ]; then let j=$maxindex-$menuitems+$i echo " Internal mirrors:" @@ -91,10 +100,10 @@ echo -n "Please select one from the list above or (e)xit [1]: " read input - test -n "$input" -a $input -gt 0 -a "${#menu[$input]}" -ne 0 2>/dev/null && + test -n "$input" -a $input -ge 0 -a "${#menu[$input]}" -ne 0 2>/dev/null && ret=$input test -n "$input" -a \( "$input" = "e" -o "$input" = "E" \) 2>/dev/null && - ret=0 + ret=256 test -z "$input" 2>/dev/null && ret=1 done @@ -107,14 +116,33 @@ ret=$? echo -if test $ret -eq 0; then +if test $ret -eq 256; then echo Doing NO update, exiting... exit 0 fi -echo "UPDATING from ${menu[$ret]}" -lftp ${ftps[$ret]} -e "mirror -nevvvx CVS/* ${ftpd[$ret]} ./src ; quit" +if test $ret -gt 0 -a "${#menu[$ret]}" -ne 0 2>/dev/null; then + echo "UPDATING from ${menu[$ret]}" + lftp ${ftps[$ret]} -e "mirror -nevvvx CVS/* ${ftpd[$ret]} ./src ; quit" +fi echo -echo "verifying md5 checksums" -md5sum -c md5sum.lst | grep -v ": OK" +echo "Verifying md5 checksums" +md5sum -c md5sum.lst 2>/dev/null | grep -v ": OK" + +# check if extra files exist in src/ +check_extra_printed="" +for FILE in $((cat md5sum.lst | awk '{print $2}'; \ + find src -type f \! \( -name Entries -o -name Repository \ + -o -name Root -o -name Tag \) ) | sort | uniq -u); do + if [ -f "$FILE" ]; then + if [ ! "$check_extra_printed" ];then + echo + echo "WARNING: The following files exist in directory \"src/\"" + echo ' BUT do not have a md5sum listed in md5sum.lst!' + echo + check_extra_printed="y" + fi + echo $FILE + fi +done |