new layout
[infrastructure.git] / scripts / git-check.sh
index 67b2a42..e98ec6a 100755 (executable)
@@ -14,8 +14,10 @@ function missing_gitweb () {
     echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx missing in gitweb (for web)"
     for i in $gitwebfiles; do
        echo -n "$i "
-       if [ ! -f ${i} ] ; then
-           echo "WARNING: IS MISSING.. " ; 
+       if [ -f ${i} ] ; then
+           echo -n "OK "
+       else
+           echo -n "MISSING.. " ; 
        fi
     done
     echo ""
@@ -27,9 +29,9 @@ function fill_descriptions () {
     for arg in "$@" ; do
        # accept args like plcapi or plcapi.git
        b=$(basename $arg .git)
-       giti=${b}.git
+       git=${b}.git
        echo -n "$git "
-       grep Unnamed $git/description && { echo -n $i "Setting.. "; echo $b > $git/description ; }
+       grep -q Unnamed $git/description && { echo -n $i "Setting.. "; echo $b > $git/description ; }
     done
     echo ""
 }
@@ -39,7 +41,7 @@ function upload_archives () {
     for arg in "$@" ; do
        # accept args like plcapi or plcapi.git
        b=$(basename $arg .git)
-       giti=${b}.git
+       git=${b}.git
        echo -n "$git "
        if ! grep uploadarch $git/config ; then
            echo -n $i "Setting.. "; 
@@ -54,5 +56,5 @@ EOF
 }
 
 missing_gitweb
-fill_descriptions $(ls *.git)
-upload_archives $(ls *.git)
+fill_descriptions $(ls -d *.git)
+upload_archives $(ls -d *.git)