It worked like a charm! :-) Thanks.
On Tuesday, February 18, 2014 3:17:01 AM UTC+2, [email protected] wrote: > > On Fri, Feb 14, 2014 at 11:45 AM, Thanassis Tsiodras > <[email protected]<javascript:> > > wrote: > >> >> The following console output should be self explanatory - I can't seem to >> make Tup work with filenames containing spaces: >> >> ttsiod@avalon ~/work/ >> $ ls -l >> total 148 >> drwxr-xr-x 3 ttsiod ttsiod 4096 Feb 14 18:30 ./ >> drwxr-xr-x 27 ttsiod ttsiod 4096 Feb 14 18:27 ../ >> -rw-r--r-- 1 ttsiod ttsiod 107008 Feb 14 18:26 a b.xls >> -rwxr-xr-x 1 ttsiod ttsiod 6455 Feb 14 18:27 excelJoiner.py* >> drwxr-xr-x 4 ttsiod ttsiod 4096 Feb 14 18:30 .tup/ >> -rw-r--r-- 1 ttsiod ttsiod 59 Feb 14 18:30 Tupfile >> -rw-r--r-- 1 ttsiod ttsiod 12288 Feb 14 18:30 .Tupfile.swp >> >> ttsiod@avalon ~/work/ >> $ cat Tupfile >> : foreach *.xls |> ./excelJoiner.py "%f" "%o" |> %B.csv >> >> ttsiod@avalon ~/work/ >> $ tup upd >> [ tup ] [0.000s] Scanning filesystem... >> [ tup ] [0.001s] Reading in new environment variables... >> [ tup ] [0.001s] No Tupfiles to parse. >> [ tup ] [0.001s] No files to delete. >> [ tup ] [0.002s] Executing Commands... >> * 1) ./excelJoiner.py "a b.xls" "a b.csv" >> *** tup errors *** >> tup error: Unspecified output files - A command is writing to files that >> you didn't specify in the Tupfile. You should add them so tup knows what to >> expect. >> -- Unspecified output: a b.csv >> tup error: Expected to write to file 'a' from cmd 11 but didn't >> tup error: Expected to write to file 'b.csv' from cmd 11 but didn't >> *** Command ID=11 ran successfully, but tup failed to save the >> dependencies. >> [.] 100% >> *** tup: 1 job failed. >> >> I've also tried replacing %B.csv with "%B.csv" and using plain %o in the >> action part of the rule - but that doesn't work either. >> >> Any ideas on what I am doing wrong? >> >> >> > Hi Thanassis, > > Tup currently doesn't support files with spaces using the regular Tupfile > parser. In this particular case where you are using wild-cards, there's no > technical reason why it shouldn't be able to. In the meantime, you can use > the Lua parser like so: > > Tupfile.lua: > tup.foreach_rule('*.xls', './excelJoiner.py "%f" "%o"', '%B.csv') > > And it will work for a .xls file with a space in it. > > -Mike > -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
