PDA

View Full Version : Lack of forthought in shell scripting, in build.sh breaks running it...


chandleg
2008-09-23, 20:51
Problem:<br>
touch: cannot touch `build.sh/.firstrun': Not a directory<br>
<br>
When:<br>
sh build.sh {blah blah blah}<br>
<br>
Fix:<br>
--- build.sh.orig 2008-09-22 22:43:41.000000000 -0500<br>
+++ build.sh 2008-09-22 22:44:45.000000000 -0500<br>
@@ -487,7 +487,7 @@<br>
IFS=$_IFS<br>
}<br>
<br>
-SOURCEDIR=${0%/*}<br>
+SOURCEDIR=`dirname $0`<br>
BACKUPDIR="$SOURCEDIR/.backup"<br>
# Don't touch these. Make a ~/.xbmc-build-settings instead.<br>
# See ./build.sh --help<br>
<br>
Notes:<br>
This does not change the script's function when running as ./build.sh<br>

chandleg
2008-09-23, 20:52
Please ignore the breaks... Aparantly I didn't have to put them in...

althekiller
2008-09-23, 22:27
If you'll note in the README.linux it is not recommend to use build.sh anymore. It will be removed in due time.

chandleg
2008-09-23, 23:45
I saw that in the README... What I did not find was a replacement for it...

And now that I've gone back and re-read it. I see the alternative...
Doh..

Either way, while it's still in the tree it should probably still be usable....

althekiller
2008-09-24, 00:01
Since you're the only one to come across this oversight, I'd say it's working well enough. If anything I should be modifying it to work worse so people are encouraged not to use it :)