aboutsummaryrefslogtreecommitdiff
path: root/README.markdown
blob: ed074b5cf1bd153925a27a1d9f06c5607793dda8 (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$