mirror of
https://abf.rosa.ru/djam/python3.10.git
synced 2025-02-23 16:32:54 +00:00
14 lines
703 B
Bash
14 lines
703 B
Bash
#!/bin/sh
|
|
|
|
set -efu
|
|
|
|
find "$RPM_BUILD_ROOT" -type f -print | while read -r line ; do
|
|
if file "$line" | grep -q ELF ; then continue ; fi
|
|
if head -n 1 "$line" | grep -qE '([[:blank:]])*#([[:blank:]])*\!([[:blank:]])*.*python3' ; then
|
|
sed -i -e '1s,python3,python3.10,g' -e '1s,python3.10.12,python3.10,g' "$line"
|
|
sed -E -i "$line" \
|
|
-e '1s,([[:blank:]])*#([[:blank:]])*\!([[:blank:]])*/usr/bin/env([[:blank:]])*python3.10,#!/usr/libexec/python3.10,g' \
|
|
-e '1s,([[:blank:]])*#([[:blank:]])*\!([[:blank:]])*/usr/bin/python3.10,#!/usr/libexec/python3.10,g' \
|
|
-e '1s,([[:blank:]])*#([[:blank:]])*\!([[:blank:]])*/usr/libexec/python3.10.10,#!/usr/libexec/python3.10,g'
|
|
fi
|
|
done
|