diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2023-07-12 09:43:25 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2023-07-12 12:41:53 +1200 |
commit | ad701761e4422a9cb50c9c20ab18cefe468c4e5b (patch) | |
tree | 120458753e820713f4302cfc6bd6a43a9ca2c0fb | |
parent | Commit rewrite (diff) | |
download | ssh_negotiate_term-ad701761e4422a9cb50c9c20ab18cefe468c4e5b.tar.gz ssh_negotiate_term-ad701761e4422a9cb50c9c20ab18cefe468c4e5b.zip |
Pick shebang at build time, add Makefile
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r--[-rwxr-xr-x] | ssh_negotiate_term.py3 (renamed from ssh_negotiate_term) | 0 |
3 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97aa15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ssh_negotiate_term diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6bd479d --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +.POSIX: +.PHONY: all install clean +.SUFFIXES: +.SUFFIXES: .py3 +PREFIX = /usr/local +ALL = ssh_negotiate_term +PYTHON3 = /usr/bin/python3 +.py3: + $(PYTHON3) -c pass + awk -v python3=$(PYTHON3) 'NR == 1 { print "#!" python3 } NR > 1' $< > $@ + chmod +x ./$@ +all: $(ALL) +install: all + mkdir -p -- $(PREFIX)/bin + cp -- ssh_negotiate_term $(PREFIX)/bin +clean: + rm -f -- $(ALL) diff --git a/ssh_negotiate_term b/ssh_negotiate_term.py3 index 31cb869..31cb869 100755..100644 --- a/ssh_negotiate_term +++ b/ssh_negotiate_term.py3 |