diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0d9ca0 --- /dev/null +++ b/Makefile @@ -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/ diff --git a/README.md b/README.md index 3f3d0d6..84d5671 100644 --- a/README.md +++ b/README.md @@ -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"` \ No newline at end of file +`inotifyrun ./test.sh "echo hi" ~/Documents/table.odt "killall libreoffice"` diff --git a/libcatch b/libcatch index 0df7732..ff5cd85 160000 --- a/libcatch +++ b/libcatch @@ -1 +1 @@ -Subproject commit 0df773277ff1988e7314ef176d5ef9736a0400e9 +Subproject commit ff5cd8539ba0012e51f29a1c3e58928f1d1e80a6