Files
server/opt/psa/admin/sbin/modules/nodejs/node-patcher.sh
2026-01-07 20:52:11 +01:00

8 lines
365 B
Bash
Executable File

#!/bin/bash -e
### Copyright 1999-2024. WebPros International GmbH. All rights reserved.
find $1 -type f -print0 | xargs -0 sed -i \
-e "1s,#!/usr/bin/env node,#!${1}/bin/node,g" \
-e '1s,^#!\s*/usr/bin/python\($\|\s\),#!/usr/bin/python2\1,' \
-e '1s,^#!\s*/usr/bin/env\s\+python\($\|\s\),#!/usr/bin/env python2\1,'