b=$(basename $arg .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 ""
}
b=$(basename $arg .git)
git=${b}.git
echo -n "$git "
- if ! grep uploadarch $git/config ; then
+ if ! grep -q uploadarch $git/config ; then
echo -n $i "Setting.. ";
cat >> $git/config <<EOF
[daemon]
- uploadpack = false
+ uploadpack = true
uploadarch = true
EOF
fi
echo ""
}
-missing_gitweb
-fill_descriptions $(ls *.git)
-upload_archives $(ls *.git)
+function check_permissions () {
+ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking descriptions "
+ for arg in "$@" ; do
+ # accept args like plcapi or plcapi.git
+ b=$(basename $arg .git)
+ git=${b}.git
+ echo -n "$git "
+ chown -R root:onelab $git
+ chmod -R g+w,o-w $git
+ done
+ echo ""
+}
+
+# missing_gitweb
+args="$@"
+[[ -z "$args" ]] && args=$(ls -d *.git)
+fill_descriptions $args
+upload_archives $args
+check_permissions $args