Added makefile

This commit is contained in:
niansa 2020-10-12 11:11:47 +02:00
parent a3a4d4bee0
commit ab5a625706
3 changed files with 12 additions and 4 deletions

8
Makefile Normal file
View file

@ -0,0 +1,8 @@
all:
gcc -rdynamic -O3 inotifyrun.c libcatch/libcatch.c -o inotifyrun
debug:
gcc -rdynamic -O0 -g inotifyrun.c libcatch/libcatch.c -o inotifyrun
install:
cp inotifyrun /usr/local/bin/

View file

@ -3,10 +3,10 @@ Run a command every time a file is opened
## Setup
1. Clone: `git clone https://gitlab.com/niansa/inotifyrun.git --recursive && cd inotifyrun`
2. Compile: `clang -rdynamic inotifyrun.c libcatch/libcatch.c -o inotifyrun`
3. Install: `sudo cp inotifyrun /usr/local/bin/`
2. Compile: `make`
3. Install: `sudo install`
## Usage
This should be self-explanatory:
`inotifyrun ./test.sh "echo hi" ~/Documents/table.odt "killall libreoffice"`
`inotifyrun ./test.sh "echo hi" ~/Documents/table.odt "killall libreoffice"`

@ -1 +1 @@
Subproject commit 0df773277ff1988e7314ef176d5ef9736a0400e9
Subproject commit ff5cd8539ba0012e51f29a1c3e58928f1d1e80a6