#!/bin/sh

if [ "$1" != "--force-clean" ]
then
  echo "You must run $0 with --force-clean."
  echo "WARNING: $0 will destroy your working copy."
  echo "         You have been warned."
  exit
fi

echo "Running WebKit Commit Queue."
while :
do
    ./WebKitTools/Scripts/bugzilla-tool bugs-to-commit | xargs -n1 ./WebKitTools/Scripts/bugzilla-tool land-patches --force-clean --commit-queue --quiet
    echo "Sleeping...."
    sleep 600
done
echo "Finished WebKit Commit Queue."
