D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
local
/
psa
/
admin
/
sbin
/
modules
/
nodejs
/
Filename :
unpack-node.sh
back
Copy
#!/bin/bash -e ### Copyright 1999-2024. WebPros International GmbH. All rights reserved. [ -d $2 ] && mv $2 "$2.back" mkdir -m 755 $2 tar -xf $1 -C $2 --unlink-first --strip-components 1 find $2 -type f -print0 | xargs -0 sed -i \ -e "1s,#!/usr/bin/env node,#!${2}/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,' [ -d "$2.back" ] && rm -rf "$2.back"