--- Log opened Fri Aug 18 00:00:02 2006 |
00:01 | < Vornotron> | TF, where's that bash scripting guide? |
00:03 | <@ToxicFrog> | www.tldp.org/LDP/abs/html/ |
00:03 | < Vornotron> | awesome |
00:03 | < Vornotron> | thanks |
00:10 | <@ToxicFrog> | Links to stuff like language references and the SDL reference would probably be handy, too. |
00:13 | < Vornotron> | Indeed. |
00:13 | <@ToxicFrog> | And I know there was something else I wanted to suggest, but can't remember what it is now. |
00:14 | <@ToxicFrog> | (also, once you get the wiki up, I'm going to go through my LJ and copy all my random code snippets over if that's alright) |
00:14 | < Vornotron> | (I also) |
00:16 | < Vornotron> | Okay. Using grep or egrep: I have a sentence "At revision (\d+)." I want \1 |
00:16 | <@ToxicFrog> | As in, you want it to return only the bit that was captured, not the entire thing? |
00:17 | < Vornotron> | right |
00:17 | <@ToxicFrog> | One moment while I consult the lore. This may require use of sed as well. |
00:18 | <@ToxicFrog> | Yes, it needs sed. So, it's: |
00:18 | <@ToxicFrog> | egrep --only-matching 'At revision (\d+)' | sed -re 's;At revision (\d+);\1;' |
00:19 | <@ToxicFrog> | You may also be able to do it with awk: |
00:19 | <@ToxicFrog> | egrep --only-matching 'At revision \d+' | awk '{ print $3 }' |
00:21 | <@ToxicFrog> | Actually, the latter's probably the better way. |
00:21 | < Vornotron> | there's a period at the end, too. |
00:21 | < Vornotron> | oh, okay, I see. |
00:22 | <@ToxicFrog> | So append \. |
00:22 | < Vornotron> | nemiind |
00:22 | < Vornotron> | I don't want to catch the period. |
00:22 | <@ToxicFrog> | Don't append it, then. |
00:22 | <@ToxicFrog> | --only-matching deals with that; it only displays the part of the line that matches rather than the entire line. |
00:22 | <@ToxicFrog> | So the period gets trimmed by grep, and then awk pulls out field 3 - the revision number - from the rest. |
00:23 | < Vornotron> | I think this will be the first time I actually use awk. |
00:24 | <@ToxicFrog> | Awk is the antimatter conversion bomb to sed's firecracker~ |
00:24 | < Vornotron> | Like egrep is the orbital solar mirrors to find's flashlight? |
00:24 | <@ToxicFrog> | Precisely. |
00:24 | < Vornotron> | all right then. |
00:24 | | * Vornotron wants a Death Ray. |
00:26 | < Vornotron> | How do I leave a script early? exit? |
00:26 | | Chalc [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
00:26 | <@ToxicFrog> | In bash? |
00:26 | <@ToxicFrog> | Exit, return or break. |
00:27 | <@ToxicFrog> | Depending on how far you want to leave. |
00:27 | | * ToxicFrog ponders. |
00:27 | <@ToxicFrog> | I've only written one awk script in the past few years. |
00:27 | < Vornotron> | I want to end the script. |
00:27 | <@ToxicFrog> | exit 0 |
00:27 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
00:27 | <@ToxicFrog> | (or, well, exit $EXIT_CODE) |
00:28 | | Chalc is now known as Chalcedon |
00:28 | <@ToxicFrog> | /^[0-9]+ 1 1 1/ { trials["Response" $1] = 1 } |
00:28 | <@ToxicFrog> | /^Response([0-9]+)/ { if( $1 in trials ) { print $1 ":\t" $2 } } |
00:28 | <@ToxicFrog> | I'm averaging half a line of awk code per year~ |
00:30 | < Vornotron> | I'm adding the singleton-process thing. |
00:30 | <@ToxicFrog> | Aah. |
00:30 | <@ToxicFrog> | Well, the semantics are pretty much the same as in C. |
00:31 | < Vornotron> | Can I make multiple replacements in a single sed command, or do I have to do plumbing? |
00:36 | < Vornotron> | <template.html sed s/__REVISION__/$revision/ s/__MESSAGE__/$message/ s/__COLOR__/$color/ > CIpage.html <--- thusly? |
00:47 | <@ToxicFrog> | Plumbing. |
00:47 | <@ToxicFrog> | Preface each one with a -e |
00:47 | < Vornotron> | -e? |
00:47 | <@ToxicFrog> | sed -r -e <<pattern one>> -e <<pattern two>> ... -e <<pattern n>> <template.html >CIpage.html |
00:49 | <@ToxicFrog> | -r enables EREs, and -e script-commands executes the given command(s). |
00:49 | < Vornotron> | Okay. |
00:51 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
01:01 | | ReivUni [~82d94c4d@Nightstar-14006.mail.city-net.pl] has joined #Code |
01:02 | < ReivUni> | Test didn't completely suck! |
01:08 | < Vornotron> | woot |
01:12 | | * ReivUni now fiddles. |
01:12 | < ReivUni> | Peice Board[][] = new Peice[8][8]; |
01:12 | < ReivUni> | Is this teh right syntax to get an 8x8 array of Peices? |
01:15 | < Vornotron> | Piece |
01:15 | < ReivUni> | Yes. |
01:15 | < ReivUni> | I am mispelling it in my code, too. |
01:15 | < Vornotron> | I think so. |
01:20 | < Vornotron> | ...unterminated s command? |
01:21 | < ReivUni> | ...?? |
01:22 | < Vornotron> | I'm trying to use sed. It's... not working. |
01:22 | < ReivUni> | Oh dear. |
01:28 | < Vornotron> | OKay. |
01:28 | < ReivUni> | Working? |
01:28 | < Vornotron> | No. |
01:28 | < Vornotron> | I have no idea what to do about it though. |
01:28 | < Vornotron> | <template.html sed -e "s/__REVISION__/$revision/" -e "s/__MESSAGE__/$message/" -e "s/__COLOR__/$color/" > CIpage.html |
01:29 | < Vornotron> | $message has, uh, stuff in it. |
01:29 | | * ReivUni eyes that. |
01:29 | < Vornotron> | spaces, and stuff. |
01:29 | < Vornotron> | It gives me unterminated s command on it, and I don't know how to stop it. |
01:29 | < ReivUni> | I... seee... |
01:29 | < Vornotron> | Yeah. |
01:30 | < Vornotron> | I need a bash guru. |
01:30 | < ReivUni> | Would I be right in guessing it's probably the spaces that are killing it, or? |
01:30 | < Vornotron> | It probably is, but I don't know how to fix that. |
01:32 | < ReivUni> | Hrmmm. |
01:39 | <@ToxicFrog> | As long as the commands are quoted, it's not the spaces. |
01:39 | <@ToxicFrog> | However, it might be other characters that are significant to sed. |
01:43 | <@ToxicFrog> | Vornotron: what are the actual values of these variables? |
02:03 | | ReivUni [~82d94c4d@Nightstar-14006.mail.city-net.pl] has quit [Quit: Off to appointment!] |
02:50 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
02:51 | | mode/#code [+o Chalcedon] by ChanServ |
02:59 | | Vornotron [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Quit: ] |
04:20 | | Vornicus [~vorn@Nightstar-25742.veracitycom.net] has joined #code |
04:20 | | mode/#code [+o Vornicus] by ChanServ |
04:21 | | * Vornicus beats his ISP with a stick. |
06:00 | | himi-FotR is now known as himi |
06:02 | | Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #code |
06:02 | | mode/#code [+o Mahal] by ChanServ |
06:07 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
06:07 | | mode/#code [+o Chalcy] by ChanServ |
06:08 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
06:08 | | Chalcy is now known as Chalcedon |
06:48 | <@ReivClass> | wiki still dead, huh? |
06:48 | | ReivClass is now known as Reiver |
06:48 | <@Mahal> | REIVER |
06:49 | <@Reiver> | MAHAL |
07:04 | <@Vornicus> | Wiki is still dead. They forgot to tell me that I'd need to write down my static IP so that I could set up my system to use it. And then when I found this out (from an after-hours tech support guy) he didn't have access to tell me that IP. |
07:04 | <@Mahal> | Useful. |
07:04 | <@Vornicus> | Yeah. |
07:04 | | * Mahal points in the general direction of her webhost happily. |
07:05 | <@Mahal> | No more dyndns or etc for me! |
07:05 | <@Vornicus> | Not, at that, that I would have been able to use it anyway - I'd still need a subnet mask and a gateway. |
07:05 | | EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout] |
07:05 | <@Vornicus> | yey webhost |
07:05 | <@Mahal> | Yes!!! |
07:05 | <@Mahal> | They are teh awesomeness. |
07:06 | <@Mahal> | Cheap and OMG good support. |
07:06 | <@Vornicus> | Sadly I doubt I could get anybody to host my stuff - I need Python and PHP and MySQL and SVN and... |
07:06 | <@Mahal> | .... |
07:06 | <@Mahal> | You /seriously/ could. |
07:06 | | * Mahal points at her webhost. |
07:06 | <@Mahal> | I am /not/ kidding. |
07:06 | <@Vornicus> | and several gig of space and a blind eye toward low-level piracy. |
07:07 | <@Mahal> | You probably couldn't get it for the US$7 a month I pay, but I'm reasonably certain that they'd be willing do to the above. |
07:07 | <@Vornicus> | Anyway I like hosting my own stuff, it's easier to get at that way. |
07:07 | <@Mahal> | True :) |
07:08 | | * Mahal is just randomly making the point that her webhost rocks, actually. |
07:08 | <@Vornicus> | "oh, I need to change my httpd.conf. Okay, open TextWrangler..." |
07:08 | <@Mahal> | :) |
07:08 | | * Mahal <3 textwrangler! |
07:08 | <@Reiver> | TextWrangler? |
07:09 | <@Vornicus> | "oh, look, some nutjob is downloading my stuff so hard that I can't keep my connection up. Well, okay. One shell script later, all those PDFs are 50-byte text files." |
07:09 | <@Vornicus> | TextWrangler: a text editor for MacOS X. |
07:09 | <@Mahal> | :D |
07:09 | <@Vornicus> | It may also exist for Windows, I don't know. |
07:10 | <@Reiver> | notepad, vi, or emacs, Vorn? |
07:10 | <@Vornicus> | Notepad, definitely. |
07:10 | <@Reiver> | ah |
07:10 | <@Vornicus> | I don't want to have to rtfm to use the basic functions of a text editor. |
07:10 | <@Reiver> | just with a bit more grunt? |
07:10 | <@Vornicus> | Or, do you mean, the feature set of TextWrangler? |
07:11 | <@Reiver> | Er, yes. |
07:11 | <@Reiver> | (Sorry) |
07:11 | <@Vornicus> | In which case it is closest to emacs. |
07:11 | <@Vornicus> | But nowhere near as daunting. |
07:11 | <@Reiver> | right. |
07:12 | <@Vornicus> | -- that said, vi and notepad are dang close together. |
07:13 | <@Reiver> | They are, come to think of it. |
07:13 | <@Reiver> | Just one is arcane whilst the other is GUI. |
07:13 | <@Reiver> | :p |
07:14 | < himi> | um |
07:14 | < himi> | vi is rather powerful |
07:14 | < himi> | Notepad is basically just a text widget |
07:15 | < himi> | The only comparison between them is that they edit text |
07:16 | <@Reiver> | What I wish notepad could do, which would save me half the trouble I find in it: |
07:16 | <@Reiver> | Vertical text selection. |
07:16 | <@Reiver> | (AKA select everything in one colum rather than one row.) |
07:45 | | Serah [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has quit [Ping Timeout] |
08:03 | | Chalcedon is now known as Cinderella |
08:22 | | Reiver is now known as ReivOut |
08:34 | | Mahal is now known as MahalAFK |
08:35 | | Vornicus is now known as Vornicus-Latens |
08:44 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
08:45 | | mode/#code [+o Chalcy] by ChanServ |
08:46 | | Cinderella [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
09:04 | | MahalAFK is now known as Mahal |
10:34 | | Serah [~Shemhazai@Nightstar-27025.bynxx4.adsl-dhcp.tele.dk] has joined #Code |
10:58 | | Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has quit [Quit: This computer just fell asleep.] |
12:10 | | Chalc [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
12:10 | | Chalc is now known as Cinderella |
12:11 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
12:11 | | Cinderella is now known as Chalcedon |
12:45 | | ReivOut is now known as Reiver |
14:19 | | ultratopo [~ultratopo@Nightstar-2837.bricapar.com.py] has joined #Code |
14:20 | | ultratopo [~ultratopo@Nightstar-2837.bricapar.com.py] has left #Code [] |
14:48 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
14:49 | | mode/#code [+o Chalcy] by ChanServ |
14:49 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
15:33 | | Serah [~Shemhazai@Nightstar-27025.bynxx4.adsl-dhcp.tele.dk] has quit [Ping Timeout] |
15:34 | | Serah [~Shemhazai@Nightstar-27025.bynxx4.adsl-dhcp.tele.dk] has joined #Code |
16:49 | | Serah [~Shemhazai@Nightstar-27025.bynxx4.adsl-dhcp.tele.dk] has quit [Ping Timeout] |
17:03 | | Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code |
17:41 | | Reiver is now known as ReivZzz |
17:49 | < Vornicus> | arg. Now I can't remember how to write that automation script thingy. |
17:50 | < Vornicus> | er |
17:50 | < Vornicus> | the thing, that calls the bash script, in windows, via cygwin. |
18:00 | <@jerith> | "start /cygwin/bin/bash <script>" perchance? |
18:00 | <@jerith> | (bearing in mind that I haven't used cygwin in quite a number of years.) |
18:01 | <@jerith> | Is the intarweb not helping? |
18:01 | < Vornicus> | I haven't found anything. I know TF mentioned one a day or three ago in this channel. |
18:03 | < Vornicus> | but I can't find it in the backlog. |
18:04 | <@jerith> | Grepping of my logs turns up nothing helpful. :-/ |
18:05 | <@jerith> | Perhaps it was elsewhere? |
18:05 | < Vornicus> | Perhaps |
18:08 | <@jerith> | Is it to run a bash script from windows? |
18:08 | <@jerith> | Bash takes the script as a parameter. |
18:08 | < Vornicus> | yeah |
18:08 | <@jerith> | So anything that calls bash with the script file should do it. |
18:09 | <@jerith> | I found that without the "start" in front of it, starting putty from a script would leave a console open. |
18:21 | | himi [~himi@Nightstar-29007.ACT.netspace.net.au] has quit [Ping Timeout] |
18:22 | | himi [~himi@Nightstar-29007.ACT.netspace.net.au] has joined #code |
18:25 | | ReivZzz [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout] |
18:26 | | Reivlin [~reiver@Nightstar-873.ubs-dsl.xnet.co.nz] has quit [Ping Timeout] |
18:47 | < Vornicus> | that doesn't work - COmmand NOt Found |
18:48 | < Vornicus> | like, all over the place. |
19:13 | <@ToxicFrog> | Vornicus: c:/cygwin/bin/run.exe bash -- bash name-of-script |
19:15 | <@ToxicFrog> | jerith: 'start' is the windows equivalent of the & background operator, kind of. |
19:15 | <@ToxicFrog> | It starts a seperate console session, runs the command in that and returns immediately. |
19:15 | < Vornicus> | name of script - does that have to be unix or windows path? |
19:16 | <@ToxicFrog> | Either should work, but I used the posix path... |
19:16 | < Vornicus> | ok |
19:16 | <@ToxicFrog> | Also, if it's properly shebang'd and +x you should only need bash -- script-name: |
19:16 | <@ToxicFrog> | C:\cygwin\bin\run.exe -p /usr/X11R6/bin bash -- /usr/local/bin/ned |
19:17 | <@ToxicFrog> | (the "-p /usr/X11R6/bin" adds that as a PATH entry) |
19:17 | < Vornicus> | Is it supposed to return immediately? |
19:18 | <@ToxicFrog> | As a rule, yes; recall that 'run' backgrounds it. |
19:18 | < Vornicus> | oh |
19:18 | < Vornicus> | uh |
19:18 | <@ToxicFrog> | If you need the output just invoke it as c:/cygwin/bin/bash -- script-name |
19:19 | < Vornicus> | actually I tried that one, it yelled about all the commands being missing. |
19:19 | <@ToxicFrog> | ...buh. |
19:20 | <@ToxicFrog> | Oh. |
19:20 | <@ToxicFrog> | Right. PATH wackiness. |
19:21 | <@ToxicFrog> | c:/cygwin/bin/bash.exe -c "PATH=/bin:/usr/bin:/usr/local/bin:$PATH; script-name" |
19:21 | <@ToxicFrog> | Alternately, modify PATH in the windows environment configurator or put it in a batch file that does SET PATH before invoking bash. |
19:23 | < Vornicus> | YEYWORKY |
19:25 | | * jerith smiles happily. |
20:10 | < Vornicus> | I think it's worky anyway. |
20:10 | <@ToxicFrog> | ? |
20:11 | < Vornicus> | Once I got it working I dumped it into a batch script and dumped it into Scheduled Tasks. |
20:12 | <@ToxicFrog> | Aah. |
20:12 | <@ToxicFrog> | What is it, anyways? |
20:13 | < Vornicus> | It's a thing that downloads the latest version of REsmark from the svn server, then runs the unit tests, then updates a webpage. |
20:13 | <@ToxicFrog> | Aah. |
20:13 | < Vornicus> | the webpage itself has a meta refresh on it. |
20:15 | < Vornicus> | So the computer sits in a corner refreshing a webpage that says whetehr the unit tests work. |
20:15 | < Vornicus> | in 240-point font. |
20:17 | <@ToxicFrog> | Pffft. |
20:17 | < Vornicus> | (it also turns red or green, accordingly) |
20:33 | <@jerith> | :-) |
20:36 | < Vornicus> | ...I don't think it's working. |
20:36 | <@jerith> | :-( |
20:38 | < Vornicus> | It's not working. :( |
20:38 | <@jerith> | Run it by hand? |
20:38 | < Vornicus> | The unit tests haven't been touched in an hour. |
20:38 | < Vornicus> | It works by hand. |
20:38 | < Vornicus> | I just need to automate it. |
20:41 | < Vornicus> | ...doh |
20:42 | < Vornicus> | I feel dumb |
20:42 | < Vornicus> | I copied the command from a console... |
20:42 | < Vornicus> | and that means there was a line break smack dab in the middle of it. |
20:42 | <@jerith> | :-/ |
20:42 | < Vornicus> | I don't think there's a directory called /u, or one called sr/bin |
20:43 | | * jerith fiddles with savane some more. |
20:44 | < Vornicus> | ... |
20:44 | < Vornicus> | Heh |
20:44 | < Vornicus> | It's saying that bash isn't a valid win32 application. |
20:46 | <@jerith> | Probably got some exe property set wrong or something. |
20:47 | <@ToxicFrog> | 'bash', or 'bash.exe'? |
20:48 | < Vornicus> | bash.exe |
20:48 | <@ToxicFrog> | o.O |
20:48 | <@ToxicFrog> | That shouldn't happen. |
20:48 | < Vornicus> | no, it shouldn't. |
20:50 | < Vornicus> | double clicking bash.exe in explorer also gives the same response. |
20:53 | <@jerith> | Hmm, this repo creatio is probably done by cronjob. |
20:53 | <@jerith> | te |
20:53 | <@ToxicFrog> | Works fine here. |
20:53 | <@ToxicFrog> | What size is yours? |
20:53 | < Vornicus> | ...wtf |
20:53 | < Vornicus> | it's empty |
20:54 | <@ToxicFrog> | |
20:54 | <@jerith> | :-( |
20:54 | < Vornicus> | TF: exactly |
20:55 | | * jerith fills Vorn's bash.exe with Chalain's "sideways..." database and waits to see if he notices. |
20:56 | < Vornicus> | dammit!~ |
20:58 | <@jerith> | I guess he noticed. :-P |
20:58 | <@jerith> | Reinstall bash.exe? |
20:58 | | * Vornicus just did. |
20:59 | <@jerith> | And it reinstalled an empty one? |
21:01 | < Vornicus> | no, I said dammit because it's a pain to move this stuff around. |
21:01 | < Vornicus> | Anyway, I think I've got it now. |
21:02 | < Vornicus> | ...though I'm going to want to use run. |
21:22 | | himi [~himi@Nightstar-29007.ACT.netspace.net.au] has quit [Client exited] |
22:08 | | Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #code |
22:08 | | mode/#code [+o Mahal] by ChanServ |
22:23 | < Vornicus> | ...run doesn't like me. ;_; |
22:27 | <@ToxicFrog> | What's it done now? |
22:28 | < Vornicus> | I tried saying "run -p bash -c ..." |
22:28 | < Vornicus> | and it decided it didn't know what -c was. |
22:30 | <@ToxicFrog> | It's "run -p stuff-to-add-to-PATH name-of-command-to-run -- arguments-to-command |
22:30 | <@ToxicFrog> | -c is a bash argument, not a run argument. |
22:30 | < Vornicus> | I know that. |
22:30 | < Vornicus> | Run complained about it though. |
22:30 | <@ToxicFrog> | Yes, because you forgot the --. |
22:30 | < Vornicus> | the... --. |
22:30 | <@ToxicFrog> | run bash -- -c foo |
22:30 | < Vornicus> | oh |
22:31 | <@ToxicFrog> | Yes. --, the traditional flag marking 'end of flags and beginning of non-flag arguments' |
22:31 | < Vornicus> | oh. |
22:31 | <@ToxicFrog> | And the -p is only needed for adding stuff to PATH. If you have nothing to add, omit it. |
22:31 | <@ToxicFrog> | The command above works out to: |
22:31 | <@ToxicFrog> | $ PATH=$PATH:bash |
22:31 | <@ToxicFrog> | $ -c |
22:32 | < Vornicus> | I copied it from your nedit run line |
22:33 | <@ToxicFrog> | My nedit run line has a path after the -p, though. |
22:33 | <@ToxicFrog> | And a -- at the end of the arguments to run. |
22:39 | < Vornicus> | gnar. Using 'start' makes it so the script can't see itself. |
22:39 | < Vornicus> | Watching a database population script try to run concurrently with itself is, uh |
22:39 | < Vornicus> | bad. |
22:41 | <@ToxicFrog> | I can imagine. |
22:41 | <@ToxicFrog> | Why are you using start? |
22:41 | < Vornicus> | Because I couldn't get run to work. |
22:41 | <@ToxicFrog> | Why, what's it doing now? |
22:42 | < Vornicus> | It's still blocking on the console window. |
22:42 | <@ToxicFrog> | Blocking as in waiting for user input? |
22:42 | < Vornicus> | BLocking as in not giving back the command prompt or closing it (as in a noninteractive window) |
22:43 | <@ToxicFrog> | ...are you invoking run from the command line? |
22:43 | < Vornicus> | I tried that once, yes. |
22:43 | <@ToxicFrog> | Because that's really not how it's meant to be used. |
22:43 | < Vornicus> | THe production location is in a batch script. |
22:44 | <@ToxicFrog> | If it's running from the bash script, you shouldn't have a console window at /all/ |
22:44 | | * Vornicus essentially wants his script to run but not show a console window. |
22:44 | <@ToxicFrog> | Err, from a batch script. |
22:45 | <@ToxicFrog> | That's what run does. |
22:45 | <@ToxicFrog> | Or should do. |
22:45 | < Vornicus> | Yeah, it hasn't done that. |
22:46 | < Vornicus> | start doesn't do it either, but even worse it makes individual runs of my script invisible to each other. |
22:46 | <@ToxicFrog> | Start runs it in a seperate console window. |
22:46 | <@ToxicFrog> | Huh. Weird. |
22:47 | <@ToxicFrog> | Could you possibly upload the script somewhere so I can take a look? |
22:47 | <@ToxicFrog> | And paste your invocation line? |
22:47 | < Vornicus> | c:/cygwin/bin/bash.exe -c "PATH=/bin:/usr/bin:/usr/local/bin:$PATH; /cygdrive/c/trunk/update_and_test.sh" |
22:47 | < Vornicus> | That's in my batch file. |
22:48 | <@ToxicFrog> | That'll result in a shell window, but looks fine otherwise. |
22:48 | < Vornicus> | i can't upload update_and_test.sh, but suffice it to say that it has several non-daemon, output-redirected processes that take a while to run. |
22:50 | | Chalcy is now known as Chalcedon |
22:51 | <@ToxicFrog> | Hmm. |
22:51 | <@ToxicFrog> | And the window appears even when invoked through run, and remains even after the script exits? |
22:52 | < Vornicus> | When the script ends the window goes away. |
22:53 | < Vornicus> | I think I might be misusing Run, but I don't remember how I did it. |
22:53 | <@ToxicFrog> | But it appears even if you use run. |
22:53 | <@ToxicFrog> | Well. Based on the above line, it should be: |
22:54 | <@ToxicFrog> | c:/cygwin/bin/run.exe -p /bin -p /usr/bin -p /usr/local/bin bash -- /cygdrive/c/trunk/update_and_test.sh |
22:54 | <@ToxicFrog> | You may be able to omit all the -p stuff, since run sets up a lot of pathing automatically that bash doesn't. |
23:01 | < Vornicus> | ...I think it's working this time. |
23:06 | < Vornicus> | ...arg. run also makes it invisible to itself. |
23:06 | <@ToxicFrog> | Argh. |
23:06 | <@ToxicFrog> | I think you need a lockfile, then. |
23:06 | < Vornicus> | ...oh, duh |
23:16 | < Vornicus> | ...wtf |
23:17 | < Vornicus> | agh, the lockfile keeps getting stomped on. |
23:24 | <@ToxicFrog> | wtf |
23:24 | <@ToxicFrog> | "stomped on" how? |
23:25 | | MahalWork [~Mahal@Nightstar-5049.worldnet.co.nz] has quit [Connection reset by peer] |
23:25 | <@ToxicFrog> | [ -f $LOCKFILE ] is false when it should be true and it ends up recreating it? |
23:25 | < Vornicus> | yeah |
23:26 | | MahalWork [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #Code |
23:26 | | mode/#code [+o MahalWork] by ChanServ |
23:26 | < Vornicus> | ...but now it's working. I didn't even change anything. |
23:26 | | * Vornicus must be going batshit. |
23:49 | | * Chalcedon has had a few of those |
--- Log closed Sat Aug 19 00:00:02 2006 |