summaryrefslogtreecommitdiff
blob: c9f2bfe1852e17cc17043ae694f3c68c0cb1243a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--- Tools/eBayAgent_Skript.orig	2005-06-12 14:41:53.000000000 -0400
+++ Tools/eBayAgent_Skript	2005-06-12 14:47:57.000000000 -0400
@@ -35,12 +35,21 @@ ITEMS="2534478656 2533973254 2534483715 
 # along with this program; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+# Patched to read the settings from $HOME/.eBayAgent_Skript.conf
+# This will check if a config file exists. If not -> create
+if [ ! -e $HOME/.eBayAgent_Skript.conf ];then
+	sed -n '/^# This is a simple/,/^ITEMS=/p' /bin/eBayAgent_Skript > $HOME/.eBayAgent_Skript.conf
+	echo "Please adjust $HOME/.eBayAgent_Skript.conf to your needs first!"
+	exit	
+fi
+source $HOME/.eBayAgent_Skript.conf
+
 # fetching the data and sorting takes about 2-3 secs per article
 (
 for ITEM in $ITEMS ; do 
 	# fetch article data, cut out end time
-	# date is gmtime(); "(GMT)" is hard coded in eBayAgent.pl
-	DATE=$(eBayAgent.pl -c $ITEM |
+	# date is gmtime(); "(GMT)" is hard coded in eBayAgent
+	DATE=$(eBayAgent -c $ITEM |
 		sed -n 's/Bid End time.*: \(.*\) (GMT)$/\1/p')
 	# convert to seconds since 1.1.1970
 	SECS=$(date +%s --date "$DATE")
@@ -53,7 +62,7 @@ sort -n -k1 |
 # and then bid one after the other. 
 while read SECS ITEM ; do 
 	echo 
-	eBayAgent.pl -i $ITEM -b $MAX -E
+	eBayAgent -i $ITEM -b $MAX -E
 	# if not successful, continue
 	test $? -ne 99 && continue
         # ok, it's 99, so we won. so exit. 
--- Tools/repebay.old	2005-06-12 14:48:38.000000000 -0400
+++ Tools/repebay	2005-06-12 14:48:43.000000000 -0400
@@ -19,13 +19,13 @@ elif [ ! "$1" ] && [ ! "$2" ]; then
 fi
 
 if [ "$RCFILE" = "" ]; then
- until [ $(ebayagent -i $AUCTION | egrep -c "(Auction has ended|Canceling snipe)") -ge "1" ]
+ until [ $(eBayAgent -i $AUCTION | egrep -c "(Auction has ended|Canceling snipe)") -ge "1" ]
   do
-   ebayagent -i $AUCTION -b $MAXBID
+   eBayAgent -i $AUCTION -b $MAXBID
   done && echo Auction $AUCTION has already ended
 else
- until [ $(ebayagent -i $AUCTION | egrep -c "(Auction has ended|Canceling snipe)") -ge "1" ]
+ until [ $(eBayAgent -i $AUCTION | egrep -c "(Auction has ended|Canceling snipe)") -ge "1" ]
   do
-   ebayagent -i $AUCTION -b $MAXBID -r $RCFILE
+   eBayAgent -i $AUCTION -b $MAXBID -r $RCFILE
   done && echo Auction $AUCTION has already ended
 fi
--- Tools/runrepebay.old	2005-06-12 14:48:23.000000000 -0400
+++ Tools/runrepebay	2005-06-12 14:48:32.000000000 -0400
@@ -57,21 +57,21 @@ if [ -d $HOME/.eBay ]; then
      cd $HOME/.eBay
      for AUCTIONNR in $(ls | grep -E [0-9]{10} | grep -v done)
        do
-        if [ $(ebayagent -i $AUCTIONNR | grep -c "Auction has ended") -gt "0" ]; then
+        if [ $(eBayAgent -i $AUCTIONNR | grep -c "Auction has ended") -gt "0" ]; then
            mv $HOME/.eBay/$AUCTIONNR $HOME/.eBay/$AUCTIONNR-done
            echo "Auction for article number $AUCTIONNR has already ended."
            echo "$(grep ^\# $AUCTIONNR-done)"
            echo ""
         else
           if [ "$(grep ^[0-9]*\.[0-9]*$ $HOME/.eBay/$AUCTIONNR)" ]; then
-             if [ ! $(ps ux | grep -v grep | grep -c "ebayagent -i $AUCTIONNR") -gt "0" ]; then
+             if [ ! $(ps ux | grep -v grep | grep -c "eBayAgent -i $AUCTIONNR") -gt "0" ]; then
                 screen -S "$SCREENID" -X screen "$RUNCLIENT" "$AUCTIONNR" $(grep -v ^\# $HOME/.eBay/"$AUCTIONNR")
                 echo "Bidding for article number $AUCTIONNR:"
                 echo "$(grep ^\# $AUCTIONNR)"
                 echo ""
              else
                 echo "Already bidding for article number $AUCTIONNR:"
-                echo "$(ps ux | grep -v grep | grep "ebayagent -i $AUCTIONNR")"
+                echo "$(ps ux | grep -v grep | grep "eBayAgent -i $AUCTIONNR")"
                 echo "$(grep ^\# $AUCTIONNR)"
                 echo ""
              fi