-
-repoflags()
-{
- $ECHO "$repos_urls" | grep "^$1 " | cut -d '|' -f 4 | tr -d ' '
-}
-
-listrepos()
-{
- for d in $repos; do
- p="${d%dir}"
- f="`repoflags "$d"`"
- # if we have .no file, skip
- if [ -f "$d.no" ]; then
- msg "Repository $d disabled by a .no file, delete $d.no to enable"
- continue
- fi
- # if .yes file exists, always keep it
- if [ -f "$d.yes" ]; then
- msg "Repository $d enabled by a .yes file"
- $ECHO "$d"
- continue
- fi
- # remove broken clones so they don't mess up stuff
- if [ x"$d" != x"." ] && [ -d "$d" ] && ! [ -d "$d/.git" ]; then
- msg "$d exists but has no .git subdir. Probably a broken clone. Deleting."
- verbose rm -rf "$d"
- continue
- fi
- # if we have the dir, always keep it
- if [ -d "$d" ]; then
- msg "Repository $d enabled because it already exists"
- $ECHO "$d"
- continue
- fi
- # if we have matching pk3, skip
- if [ x"$p" != x"$d" ] && [ -f "$p" ]; then
- msg "Repository $d disabled by matching .pk3 file, delete $p or create $d.yes to enable"
- continue
- fi
- # if "no" flag is set, skip
- case ",$f," in
- *,no,*)
- msg "Repository $d disabled by default, create $d.yes to enable"
- continue
- ;;
- esac
- # default: enable
- msg "Repository $d enabled by default"
- $ECHO "$d"
- done
-}
-
-repos=`listrepos`
+if { measure_time sh -c 'true'; } 2>&1 >/dev/null | grep '^user ' >/dev/null; then
+ msg "Timing via the time utility works."
+else
+ have_time=false
+ msg "Timing not supported."
+fi