~ubuntu-branches/ubuntu/saucy/lsyncd/saucy-proposed

« back to all changes in this revision

Viewing changes to examples/lbash.lua

  • Committer: Package Import Robot
  • Author(s): Jan Dittberner
  • Date: 2013-06-22 23:14:59 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20130622231459-ngiwwvd9u5xmt0iy
Tags: 2.1.5-1
* New upstream version (Closes: #707328).
* refresh debian/patches/dont_install_lua_as_docs.patch
* debian/control:
  - change Homepage to github page
  - switch to canonical Vcs-* URLs
  - bump Standards-Version to 3.9.4 (no changes)
* debian/rules:
  - add --add-missing to automake invocation to add missing test-driver and
    remove test-driver in clean target (Closes: #713793)
* debian/lsyncd.init:
  - don't source /lib/init/vars.sh and don't use $VERBOSE, don't use
    --make-pidfile
  - add --nicelevel to lsyncd invocation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
-----
2
2
-- User configuration file for lsyncd.
 
3
--
 
4
-- This example uses local bash commands to keep two local
3
5
-- directory trees in sync.
4
6
--
5
7
settings = {
28
28
        -- calls `cp -r SOURCE/* TARGET` only when there is something in SOURCE
29
29
        -- otherwise it deletes contents in the target if there.
30
30
        onStartup = [[
31
 
if [ "$(ls -A ^source)" ]; then 
32
 
        cp -r ^source* ^target; 
33
 
else 
 
31
if [ "$(ls -A ^source)" ]; then
 
32
        cp -r ^source* ^target;
 
33
else
34
34
        if [ "$(ls -A ^target)" ]; then rm -rf ^target/*; fi
35
35
fi]],
36
36
 
37
37
        onCreate = prefix..[[cp -r ^sourcePath ^targetPathdir]],
38
 
        
 
38
 
39
39
        onModify = prefix..[[cp -r ^sourcePath ^targetPathdir]],
40
 
        
 
40
 
41
41
        onDelete = prefix..[[rm -rf ^targetPath]],
42
42
 
43
43
        onMove   = prefix..[[mv ^o.targetPath ^d.targetPath]],