[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cvs-ml 644] Re: cvsq
From: Shun-ichi GOTO <gotoh@taiyo.co.jp>
Subject: [cvs-ml 641] Re: cvsq
Date: Tue, 4 Jul 2000 15:48:55 +0900
| cvs-ml には最近入った後藤です
#Mew方面ではおせわになっています.
| ダメの解消にはこんな感じでしょうか。(未テスト注意)
キューというからにはFIFO動作になってないと気持ち悪いので
こんな感じにしてみました。ファイルのレイアウトを
~/.cvsq/todo.00から~/.cvsq/todo/00に変えました。
--- cvsq.org Wed Jul 5 15:26:43 2000
+++ cvsq Wed Jul 5 15:37:15 2000
@@ -39,7 +39,7 @@
output_command()
{
- output_cmd "$@" >>~/.cvsq/todo.$SLOT_NUM
+ output_cmd "$@" >>$HOME/.cvsq/todo/$SLOT_NUM
}
@@ -47,11 +47,8 @@
first_free_slot()
{
- SLOT=0
-
- while [ -f ~/.cvsq/todo.$SLOT ] ; do
- SLOT=`expr $SLOT + 1`
- done
+ SLOT=`{ echo 0; ls $HOME/.cvsq/todo; } | sort -n | tail -1`
+ SLOT=`expr $SLOT + 1`
echo $SLOT
}
@@ -59,14 +56,14 @@
upload_changes()
{
- for slot in ~/.cvsq/todo.* ; do
- if [ ! -f "$slot" ] ; then
+ ls $HOME/.cvsq/todo | sort -n | while read slot ; do
+ if [ ! -f "$HOME/.cvsq/todo/$slot" ] ; then
echo "Nothing in queue, exiting."
else
- sh $slot
+ sh $HOME/.cvsq/todo/$slot
if [ $? -eq 0 ] ; then
echo "[ OK ]"
- rm -f $slot
+ rm -f $HOME/.cvsq/todo/$slot
else
echo "[ FAILED, leaving in the todo list ]"
fi
@@ -84,7 +81,8 @@
fi
-mkdir -p ~/.cvsq
+mkdir $HOME/.cvsq
+mkdir $HOME/.cvsq/todo
MY_CMD=$1
--
KOIE Hidetaka 鯉江英隆 <hide@koie.org>