summaryrefslogtreecommitdiffstats
path: root/cmd/arcstat/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/arcstat/Makefile.am')
-rw-r--r--cmd/arcstat/Makefile.am14
1 files changed, 13 insertions, 1 deletions
diff --git a/cmd/arcstat/Makefile.am b/cmd/arcstat/Makefile.am
index 8987b2414..462e9a619 100644
--- a/cmd/arcstat/Makefile.am
+++ b/cmd/arcstat/Makefile.am
@@ -1 +1,13 @@
-dist_bin_SCRIPTS = arcstat.py
+dist_bin_SCRIPTS = arcstat
+
+#
+# The arcstat script is compatibile with both Python 2.6 and 3.4.
+# As such the python 3 shebang can be replaced at install time when
+# targeting a python 2 system. This allows us to maintain a single
+# version of the source.
+#
+if USING_PYTHON_2
+install-exec-hook:
+ sed --in-place 's|^#!/usr/bin/python3|#!/usr/bin/python2|' \
+ $(DESTDIR)$(bindir)/arcstat
+endif