aboutsummaryrefslogtreecommitdiff
path: root/README.markdown
blob: fcde01b018dd8135d06055f4e3a623c1dac4fa8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Lock
====

This program creates a lock directory to ensure two programs do no simulaneously execute

example GIF:

[example-footage](https://github.com/mutantturkey/lock/raw/master/lock.gif)
example:

    calvin@barnabas:~/lock$ lock p
    calvin@barnabas:~/lock$ lock p && echo 'UNLOCKED' &
    [2] 22844
    calvin@barnabas:~/lock$ rmdir p
    * two seconds later *
    calvin@barnabas:~/lock$ 
    UNLOCKED
    [2]-  Done                    lock p && echo -e '\nUNLOCKED\n'
    calvin@barnabas:~/lock$