appdwarf/apps/mknode

16 lines
389 B
Plaintext
Raw Normal View History

#!/bin/sh
2022-03-03 22:55:31 +00:00
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
2022-06-27 00:53:01 +00:00
DIR=/tmp/appdwarf/node
2022-03-03 22:55:31 +00:00
mkdir -p $DIR
2022-06-27 00:53:01 +00:00
LINK=$(curl https://nodejs.org/en/download/current/ | grep -m1 linux | cut -d\" -f4)
2022-03-03 22:55:31 +00:00
curl -L "$LINK" | bsdtar xf - -C$DIR
2022-06-27 00:53:01 +00:00
mv $DIR/node*/* $DIR
strip $DIR/bin/node
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR
sed -i 4s#/#/bin/# $DIR/AppRun
2022-06-27 00:53:01 +00:00
appdwarf $DIR
mv $DIR.sh node
rm -rf $DIR