rpms/kernel/F-11/scripts watch-task,1.1,1.2
Chuck Ebbert
cebbert at fedoraproject.org
Sun Feb 21 15:49:53 UTC 2010
- Previous message: File patch-2.6.32.9-rc1.bz2 uploaded to lookaside cache by cebbert
- Next message: rpms/kernel/F-11 patch-2.6.32.9-rc1.bz2.sign, NONE, 1.1 .cvsignore, 1.1070, 1.1071 kernel.spec, 1.1816, 1.1817 sources, 1.1032, 1.1033 upstream, 1.943, 1.944 devmem-check-vmalloc-address-on-kmem-read-write.patch, 1.1, NONE devmem-fix-kmem-write-bug-on-memory-holes.patch, 1.1, NONE devmem-introduce-size_inside_page.patch, 1.1, NONE fix-conntrack-bug-with-namespaces.patch, 1.2, NONE fix-crash-with-sys_move_pages.patch, 1.1, NONE futex-handle-user-space-corruption-gracefully.patch, 1.1, NONE prevent-runtime-conntrack-changes.patch, 1.2, NONE wmi-check-wmi-get-event-data-return-value.patch, 1.1, NONE wmi-free-the-allocated-acpi-objects.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-11/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32360
Modified Files:
watch-task
Log Message:
improved watch-task
Index: watch-task
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/scripts/watch-task,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- watch-task 3 Apr 2009 02:56:06 -0000 1.1
+++ watch-task 21 Feb 2010 15:49:53 -0000 1.2
@@ -1,21 +1,53 @@
#! /bin/sh
+ALL_OPTS=b
+usage() {
+ echo -e "Usage:\n $(basename $0) [-$ALL_OPTS] task\n"
+ echo -e " Watch koji task\n"
+ echo -e " -b: beep when task finishes"
+ echo -e " task: koji task number\n"
+ exit 1
+}
+
+LASTSTATUS=none
+getstatus() {
+ LASTSTATUS=$(koji taskinfo $WATCHED | grep "^State: ")
+ LASTSTATUS=${LASTSTATUS#"State: "}
+}
+
watchtask() {
- while true ; do
- koji taskinfo $1 | grep "^State: $2$" >/dev/null || break
- echo -en "State: $2\r"
+ while [ "$LASTSTATUS" = "$1" ] ; do
+ echo -en "State: $LASTSTATUS\r"
sleep 3m
+ getstatus
done
}
-echo "Started watching koji task $1: $(date)"
-watchtask $1 free
-watchtask $1 open
-echo " Task $1 is no longer open: $(date)"
-
-for i in $(seq 1 10) ; do
- echo -en '\a'
- sleep .2
+while getopts "$ALL_OPTS" OPTION ; do
+case $OPTION in
+b)
+ BEEP=1 ;;
+\?)
+ usage ;;
+esac
done
+shift $((OPTIND-1))
+
+[[ $# -lt 1 ]] && usage
+WATCHED=$1
+
+echo "Started watching koji task $WATCHED: $(date)"
+getstatus
+watchtask free
+watchtask open
+echo " Task $WATCHED is no longer open: $(date)"
+
+if [ "$BEEP" ] ; then
+ for i in 1 2 3 4 ; do
+ echo -en '\a'
+ sleep .3
+ done
+fi
-koji taskinfo $1
+echo
+koji taskinfo $WATCHED
- Previous message: File patch-2.6.32.9-rc1.bz2 uploaded to lookaside cache by cebbert
- Next message: rpms/kernel/F-11 patch-2.6.32.9-rc1.bz2.sign, NONE, 1.1 .cvsignore, 1.1070, 1.1071 kernel.spec, 1.1816, 1.1817 sources, 1.1032, 1.1033 upstream, 1.943, 1.944 devmem-check-vmalloc-address-on-kmem-read-write.patch, 1.1, NONE devmem-fix-kmem-write-bug-on-memory-holes.patch, 1.1, NONE devmem-introduce-size_inside_page.patch, 1.1, NONE fix-conntrack-bug-with-namespaces.patch, 1.2, NONE fix-crash-with-sys_move_pages.patch, 1.1, NONE futex-handle-user-space-corruption-gracefully.patch, 1.1, NONE prevent-runtime-conntrack-changes.patch, 1.2, NONE wmi-check-wmi-get-event-data-return-value.patch, 1.1, NONE wmi-free-the-allocated-acpi-objects.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list