mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-05-23 15:22:39 +00:00
add node script
This commit is contained in:
parent
4899507164
commit
e65013ca39
21
apps/mknode
Executable file
21
apps/mknode
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
||||||
|
DIR=/tmp/dwarf-portable-executable
|
||||||
|
mkdir -p $DIR
|
||||||
|
BASE=https://nodejs.org/dist/latest
|
||||||
|
LINK="$BASE/$(curl -L $BASE | grep linux-x64.tar.xz | cut -d'"' -f2)"
|
||||||
|
curl -L "$LINK" | bsdtar xf - -C$DIR
|
||||||
|
|
||||||
|
mv $DIR/node* $DIR/node
|
||||||
|
strip $DIR/node/bin/node
|
||||||
|
cat > $DIR/node/AppRun << 'EOF'
|
||||||
|
#!/bin/sh
|
||||||
|
HERE=$(dirname $(readlink -f "${0}"))
|
||||||
|
export PATH="${HERE}/bin":$PATH
|
||||||
|
"${HERE}"/bin/$APPDWARF_CMD $@
|
||||||
|
EOF
|
||||||
|
chmod +x $DIR/node/AppRun
|
||||||
|
|
||||||
|
appdwarf $DIR/node
|
||||||
|
mv $DIR/node.sh node
|
||||||
|
rm -rf $DIR/node
|
Loading…
Reference in a new issue