Difference between revisions of "Dev Tools/s2sync"

From Dreamwidth Notes
Jump to: navigation, search
(New page: The <code>s2sync</code> is for facilitating S2 style development. You can specify one or more layers (layout, core, i1l8n, i18nc) in the system and it will write them out onto the filesyst...)
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The <code>s2sync</code> is for facilitating S2 style development. You can specify one or more layers (layout, core, i1l8n, i18nc) in the system and it will write them out onto the filesystem where they belong.  If you specify a theme layer, it will put it into the proper themes.s2 file.  If the theme is already in the file, it will be replaced.  Otherwise, it will put the theme in its proper position if the themes file has been sorted or on the end otherwise.
+
The <code>s2sync</code> script is for facilitating S2 style development. You can specify one or more layers (layout, core, i1l8n, i18nc) in the system and it will write them out onto the filesystem where they belong.  If you specify a theme layer, it will put it into the proper themes.s2 file.  If the theme is already in the file, it will be replaced.  Otherwise, it will put the theme in its proper position if the themes file has been sorted or on the end otherwise.
  
 
If you just enter "generator", it will assume "generator/layout".  It will accept layerids, but they must have a <code>redist_uniq</code>.   
 
If you just enter "generator", it will assume "generator/layout".  It will accept layerids, but they must have a <code>redist_uniq</code>.   
Line 20: Line 20:
 
| Include the il8n layers, which are used for translation.
 
| Include the il8n layers, which are used for translation.
 
|-
 
|-
| --nothemes
+
| colspan="2"| --nothemes
|
+
 
| Use if you don't want any theme layers.  Useful when paired with --all.
 
| Use if you don't want any theme layers.  Useful when paired with --all.
 
|-
 
|-
| --noil8n
+
| colspan="2"| --noil8n
|
+
 
| Use if you don't want any il8n layers.  Useful when paired with --all.
 
| Use if you don't want any il8n layers.  Useful when paired with --all.
 
|-
 
|-
Line 41: Line 39:
 
If you are not working in $LJHOME but instead in a place like <code>$LJHOME/cvs/dw-free</code>, you can change the base directory <code>s2sync</code> saves to.  Create the file <code>$LJHOME/bin/dwdev-tools-conf.pl</code> and put this in it:
 
If you are not working in $LJHOME but instead in a place like <code>$LJHOME/cvs/dw-free</code>, you can change the base directory <code>s2sync</code> saves to.  Create the file <code>$LJHOME/bin/dwdev-tools-conf.pl</code> and put this in it:
  
  DW::DevTools::outdir_prefix = "$LJ::HOME/cvs/dw-free";
+
  $DW::DevTools::outdir_prefix = "$LJ::HOME/cvs/dw-free";
  
 
Or, whatever directory you chose.
 
Or, whatever directory you chose.
Line 55: Line 53:
 
  $LJHOME/bin/s2sync --all --verbose
 
  $LJHOME/bin/s2sync --all --verbose
  
[[Category: Dev Tools]]
+
[[Category: Dev Tools|s2sync]]

Latest revision as of 07:14, 23 September 2008

The s2sync script is for facilitating S2 style development. You can specify one or more layers (layout, core, i1l8n, i18nc) in the system and it will write them out onto the filesystem where they belong. If you specify a theme layer, it will put it into the proper themes.s2 file. If the theme is already in the file, it will be replaced. Otherwise, it will put the theme in its proper position if the themes file has been sorted or on the end otherwise.

If you just enter "generator", it will assume "generator/layout". It will accept layerids, but they must have a redist_uniq.

Arguments Table
Argument Abbreviation Description
--all -a Include all layers, including themes, unless otherwise specified in the options.
--themes -t Include all of the themes.
--il8n -i Include the il8n layers, which are used for translation.
--nothemes Use if you don't want any theme layers. Useful when paired with --all.
--noil8n Use if you don't want any il8n layers. Useful when paired with --all.
--resort -r Use if you want the themes file to be resorted; don't use normally. If done on an unsorted file, pretty much every line will be changed when diffing.
--verbose -v Use if you want more information on what the script is doing while it runs. By default, it only says something when an error occurs.

Using a different base directory

If you are not working in $LJHOME but instead in a place like $LJHOME/cvs/dw-free, you can change the base directory s2sync saves to. Create the file $LJHOME/bin/dwdev-tools-conf.pl and put this in it:

$DW::DevTools::outdir_prefix = "$LJ::HOME/cvs/dw-free";

Or, whatever directory you chose.

Examples

Dumping generator + themes:

$LJHOME/bin/s2sync --themes generator

Dump all layers and have it tell you what it is doing:

$LJHOME/bin/s2sync --all --verbose