mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-17 20:32:56 +00:00
Phantop
3ebee5f254
Deprecates $APPDWARF_CMD for $ARGV0, as part of the standard Also finally removes the separate header, as it seems to not be needed anymore
18 lines
439 B
Bash
Executable file
18 lines
439 B
Bash
Executable file
#!/bin/sh
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
|
DIR=/tmp/appdwarf
|
|
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
|
|
|
|
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR/node
|
|
sed -i 4s#/#/bin/# $DIR/node/AppRun
|
|
|
|
appdwarf $DIR/node
|
|
mv $DIR/node.sh node
|
|
rm -rf $DIR/node
|