Time Nick Message 07:39 kahrl did somebody write a collectstatic script/program already? 07:41 sfan5 what would that script do? 07:43 kahrl grab all media files from games and mods a copy them to a target directory (using the sha1 as the name) 07:43 kahrl then create a sha1 index file 08:21 kahrl is there a data structure (priority queue) in STL for: 1. iterating the binary heap in level order, 2. incrementing the (integer) sort key of a random element by 1 and fixing up the heap? 08:21 kahrl std::priority_queue doesn't seem to cut it 08:21 kahrl nor do make_heap/push_heap/pop_heap 08:25 kahrl nevermind 09:11 kahrl just noticed something strange... everything uses getBool to read enable_shaders, except mapblock_mesh.cpp which uses getS32() > 0 09:12 kahrl and the setting defaults to "true", so I think it is read as true by everything and false by mapblock_mesh.cpp 09:15 sfan5 kahrl: how would the sha1 index file looks like? "ls > index.txt" ? 09:16 kahrl sfan5: [u32] signature = 'MTHS' [u16] version = 1 [u8*20*N] binary hashes 09:16 sfan5 mhm 09:21 kahrl sfan5: http://paste.dy.fi/gXI some C++ code that may or may not compile 09:21 sfan5 saw that code already 09:27 sfan5 file extension for the index file? 09:27 kahrl I called it index.mth 09:28 kahrl doesn't really matter I'll use whatever the collectstatic script uses 09:37 sfan5 an collectstatic.sh script that may or may not work: https://gist.github.com/sfan5/6351560 09:39 kahrl awesome, thanks! 09:44 kahrl sfan5: the file names in MEDIADIR should be the sha1 sums 09:44 kahrl (hex encoded) 09:44 kahrl like in cache/media 09:46 sfan5 oh 09:46 sfan5 umm 09:49 sfan5 fixed! 09:49 sfan5 ^ kahrl 09:50 kahrl I'll try it 09:51 kahrl nice file size 09:53 kahrl sfan5: my awk (gawk) returns exit code 1 when run without arguments 09:54 kahrl (although that doesn't stop collectstatic.sh from running) 09:54 sfan5 mine does too 09:54 sfan5 derp 09:55 kahrl perhaps "which awk >/dev/null || ..." 09:55 kahrl is $MINETESTDIR supposed to be the gamedir? 09:56 sfan5 the folder where builtin is 09:56 sfan5 (and mods and games) 09:57 kahrl ah I think then a "games/" is missing 09:57 sfan5 fixed 09:57 sfan5 its almost 12:00 and apparently I'm not awake enough to write a proper bash script.. 10:02 kahrl getting lots of these: cp: cannot stat ‘./games/minetest_game/mods/./games/minetest_game/mods/fire/sounds/fire_small.ogg’: No such file or directory 10:02 kahrl apparently the names that my find returns already contain the prefix 10:02 kahrl also index.mth should be created in MEDIADIR 10:02 * sfan5 is confused 10:03 sfan5 I know that I forgot something 10:04 sfan5 should be fixed now 10:08 kahrl ok this almost works :) the media files are put into the correct place now 10:08 sfan5 <kahrl> also index.mth should be created in MEDIADIR 10:08 sfan5 I forgot that, right? 10:08 kahrl in the loop to create $MEDIADIR/index.mth the $MEDIADIR/$f needs to be replaced with $f 10:08 kahrl yeah 10:09 sfan5 done 10:10 kahrl works nicely :) thanks again 10:10 sfan5 no problem 10:31 kahrl sfan5: some more minor nitpicks: https://gist.github.com/kahrl/6351943 10:32 kahrl the escaping and the find|read f is so that it can deal with file names with spaces 10:32 kahrl there were a few -f that had to be -d 10:32 kahrl it now ignores the sha1 of index.mth when creating index.mth 10:34 sfan5 "merged" 10:35 kahrl why -f $MINETESTDIR? 10:36 sfan5 forgot that, do f5 10:38 kahrl ok great 10:38 kahrl I think this script should cover most cases for now 10:39 kahrl somebody should try to write a batch version :P 12:11 proller Zeg9, please rebase https://github.com/minetest/minetest/pull/816 13:54 andersje do aliases support multiple levels of abstraction? e.g. register_alias("alias1","real"); register_alias("alias2","alias1"); register_alias("alias3","aliase2"); so that "alias3" now refers to "real"? 13:54 andersje (pardon the mispelling of alias2 in my last line) 14:02 kahrl nope afaik 15:12 andersje okay, that explains a bunch of trouble I'm having, thanks 15:52 heh hhi 16:44 proller https://github.com/minetest/minetest/pull/892/files https://github.com/minetest/minetest/pull/883/files https://github.com/minetest/minetest/pull/882