the bigg Posted March 12, 2007 Share Posted March 12, 2007 http://forums.gibberlings3.net/index.php?showtopic=9733 Perhaps it's worth to include a fixer for the OSX "can't save" bug (whereby bg2/temp is a file by default, rather than a directory, making saves impossible)? ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ THEN BEGIN <<<<<<<< fix-temp #!/bin/sh file temp | grep "directory" || (rm -r temp; mkdir temp) >>>>>>>> COPY ~fix-temp~ ~fix-temp~ AT_NOW ~sh fix-temp~ END I'll leave to devSin the pleasure of answering further questions on OSX pleasantries and/or test Link to comment
devSin Posted March 13, 2007 Share Posted March 13, 2007 Sounds fine. I'm not sure why you'd use file over test -f, but I guess it gets the same results. Link to comment
the bigg Posted March 13, 2007 Author Share Posted March 13, 2007 Sounds fine. I'm not sure why you'd use file over test -f, but I guess it gets the same results. Basically because I have 6000 executables under my $PATH and I haven't got around to learning all of them, yet Link to comment
devSin Posted March 13, 2007 Share Posted March 13, 2007 For shell scripting, you want to learn test. It's also used as that funky [ ] command (so you can do things like [ expression ]). Link to comment
the bigg Posted March 13, 2007 Author Share Posted March 13, 2007 I'd rather learn Python and use that for scripting purposes than learning everything about bash & CLI commands BTW, according to DS' suggestions, change the inlined file to #!/bin/sh test -f temp || (rm -r temp && mkdir temp) Link to comment
devSin Posted January 29, 2008 Share Posted January 29, 2008 The code for this is wrong, and hence, useless. We want ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ THEN BEGIN <<<<<<<< fix-temp #!/bin/sh test -f temp && (rm -f temp && mkdir temp) >>>>>>>> COPY ~fix-temp~ ~fix-temp~ AT_NOW ~sh fix-temp~ END Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.