aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile15
-rw-r--r--[-rwxr-xr-x]nscaw.bash (renamed from nscaw)2
3 files changed, 14 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b7c2666
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/nscaw
diff --git a/Makefile b/Makefile
index 9814ba5..3944539 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,16 @@
.POSIX:
-.PHONY: all install
+.PHONY: all install clean
.SUFFIXES:
+.SUFFIXES: .bash
+ALL = nscaw
+BASH = /bin/bash
PREFIX = /usr/local
-all:
-install:
+all: $(ALL)
+.bash:
+ $(BASH) -c :
+ awk -v interpreter=$(BASH) 'NR == 1 { $$1 ="#!" interpreter } 1' $< > $@
+ chmod +x ./$@
+install: nscaw
cp -- nscaw $(PREFIX)/bin
+clean:
+ rm -f -- $(ALL)
diff --git a/nscaw b/nscaw.bash
index de8364f..e5651d7 100755..100644
--- a/nscaw
+++ b/nscaw.bash
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!bash
#
# Command wrapper that sends an appropriate passive check to an NSCA server