common: support disabling python shebang rewriting

useful if there are special python-containing shebangs that should not
be rewritten, for example with Ghidra's embedded jython.
This commit is contained in:
classabbyamp 2024-04-17 21:51:01 -04:00 committed by classabbyamp
parent 5b210379b4
commit 58705ffcbf
3 changed files with 8 additions and 2 deletions

View file

@ -12,6 +12,10 @@ hook() {
pyver="$python_version"
fi
if [ "$python_version" = ignore ]; then
return
fi
if [ -n "$pyver" ]; then
default_shebang="#!/usr/bin/python${pyver%.*}"
fi