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

« back to all changes in this revision

Viewing changes to examples/limagemagic.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
-- Lsyncd user-script that creates a "magic" image converter directory.
 
3
--
3
4
-- This configuration will automatically convert all images that are placed
4
5
-- in the directory 'magicdir' all resulting images are placed in the same
5
6
-- directory!
50
50
                                        if cmd ~= ""  then
51
51
                                                cmd = cmd .. " && "
52
52
                                        end
53
 
                                        cmd = cmd.. 
 
53
                                        cmd = cmd..
54
54
                                                '/usr/bin/convert "'..
55
55
                                                event.source..p..'" "'..
56
56
                                                event.source..base..'.'..k..
61
61
                        spawnShell(event, cmd)
62
62
                        return
63
63
                end
64
 
                
 
64
 
65
65
                -- deletes all formats if you delete one
66
66
                if event.etype == "Delete" then
67
67
                        -- builds one bash command
99
99
                local inlet = event.inlet
100
100
 
101
101
                if event.etype == "Create" or
102
 
                   event.etype == "Modify" or 
103
 
                   event.etype == "Delete" 
 
102
                   event.etype == "Modify" or
 
103
                   event.etype == "Delete"
104
104
                then
105
105
                        for k, _ in pairs(formats) do
106
106
                                inlet.rmExclude(base..'.'..k)