From 29846617f9290c90a05a8e63b9b7f9962c0926cc Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Mon, 15 Apr 2019 18:56:18 +0300 Subject: [PATCH] Set correct python shebang --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 8ae1ebf..d0fdda1 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ PYTHON=python3 +PYTHON_BIN := $(shell which $(PYTHON)) PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)') PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) @@ -48,6 +49,9 @@ install: sed -i -e "s,mock,$(MOCK),g" $(DESTDIR)$(BINDIR)/abf sed -i -e "s,m0ck_urpm,mock_urpm,g" $(DESTDIR)$(BINDIR)/abf + if [ "$(PYTHON)" != python3 ] && [ -x $(PYTHON_BIN) ]; then \ + sed -i -e "s,#!/usr/bin/env python3,#!$(PYTHON_BIN),g" $(DESTDIR)$(BINDIR)/abf ; fi + mkdir -p $(DESTDIR)$(DATADIR)/bash-completion mkdir -p $(DESTDIR)$(ETCDIR)/bash_completion.d mkdir -p $(DESTDIR)$(ETCDIR)/profile.d