On 6 Dec 2006, at 21:35, Alastair Moore wrote:
Ok I've found what I'm supposed to edit and where, and it works fine for two files but not for more than that.
My template code now looks like -
TM_MASTER="$TM_NEW_FILE_DIRECTORY/master.css" TM_STANDARD="$TM_NEW_FILE_DIRECTORY/standard.css"
if [[ ! (-f $TM_NEW_FILE || -f $TM_HEADER) ]]; then perl -pe 's/${([^}]*)}/$ENV{$1}/g' <html_in.html >"$TM_NEW_FILE" perl -pe 's/${([^}]*)}/$ENV{$1}/g' <master_in.css >"$TM_MASTER" perl -pe 's/${([^}]*)}/$ENV{$1}/g' <standard_in.css
"$TM_STANDARD"
fi
and the info.plist looks like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <dict> <key>command</key> <string>TM_MASTER="$TM_NEW_FILE_DIRECTORY/master.css" TM_STANDARD="$TM_NEW_FILE_DIRECTORY/standard.css"
if [[ ! (-f $TM_NEW_FILE || -f $TM_HEADER) ]]; then perl -pe 's/${([^}]*)}/$ENV{$1}/g' <html_in.html >"$TM_NEW_FILE" perl -pe 's/${([^}]*)}/$ENV{$1}/g' <master_in.css >"$TM_MASTER" perl -pe 's/${([^}]*)}/$ENV{$1}/g' <standard_in.css >"$TM_STANDARD" fi
</string> <key>extension</key> <string>html</string> <key>files</key> <string>printf "$TM_NEW_FILE\n$TM_NEW_FILE_DIRECTORY/master.css\n $TM_NEW_FILE_DIRECTORY/standard.css"</string> <key>name</key> <string>Two Column (left)</string> <key>uuid</key> <string>8C48A8D2-9526-4467-93CB-92C08AFC65F5</string> </dict> </plist>
It creates the HTML file and the master.css file but not the standard.css file. Not sure why! Any help would be well appreciated and if anyone can suggest a way I can force the css files into a subdirectory, that would be even better :)
Just a little bump, I hope you don't mind! I'm trying to get my template to create more than two files. Creating two files- fine, more than that and it's not happening. And also creating a subdirectory and creating files in that subdirectory!
Cheers,
Alastair