mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
scripts-targets.mk: Add support for perl scripts and assuming scripts without suffix to be shell scripts
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
00ab6390c2
commit
34f4bb0e6d
1 changed files with 13 additions and 2 deletions
|
|
@ -9,13 +9,24 @@ install: install-home-bin
|
|||
endif
|
||||
|
||||
HOME_BIN_EXE_SH = $(addprefix $(HOME)/bin/, $(notdir $(EXE_SH)))
|
||||
|
||||
$(HOME)/bin/%.py: %.py
|
||||
echo -e "#!/bin/sh\nexec /usr/bin/python $(shell pwd)/$<" '"$$@"' > $@.tmp
|
||||
chmod 755 $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
$(HOME)/bin/%.pl: %.pl
|
||||
echo -e "#!/bin/sh\nexec /usr/bin/perl $(shell pwd)/$<" '"$$@"' > $@.tmp
|
||||
chmod 755 $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
$(HOME)/bin/%.sh: %.sh
|
||||
echo -e "#!/bin/sh\n. $(shell pwd)/$<" '"$$@"' > $@.tmp
|
||||
chmod 755 $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
$(HOME)/bin/%.py: %.py
|
||||
echo -e "#!/bin/sh\nexec /usr/bin/python $(shell pwd)/$<" '"$$@"' > $@.tmp
|
||||
$(HOME)/bin/%: %
|
||||
echo -e "#!/bin/sh\n. $(shell pwd)/$<" '"$$@"' > $@.tmp
|
||||
chmod 755 $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue