Update shell code
Now it (mostly) passes shellcheck and is formatted with shfmt.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "$DIR"
|
||||
|
||||
ls .
|
||||
ls .
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
"$DIR"/../shims/node "$@"
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
"$DIR"/../shims/pnpm "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# figure out the platform we're on
|
||||
|
||||
@@ -11,11 +11,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# download $nodejs_version
|
||||
# verify its checksum against $nodejs_checksum
|
||||
|
||||
cd "$DIR/../node"
|
||||
|
||||
|
||||
|
||||
cd $DIR/../node
|
||||
|
||||
$DIR/pnpm install
|
||||
"$DIR"/pnpm install
|
||||
|
||||
echo we will download other files here later
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
common_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
ROOT="$common_DIR/../../"
|
||||
|
||||
# Fix for https://www.shellcheck.net/wiki/SC2148
|
||||
# shellcheck shell=bash
|
||||
|
||||
common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export ROOT="$common_DIR/../../"
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
|
||||
set -eu
|
||||
|
||||
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
node_shim_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export node_shim_DIR
|
||||
|
||||
source "$DIR/../versions"
|
||||
source "$node_shim_DIR"/../versions
|
||||
|
||||
node_bin="$DIR/../../$nodejs_bin_dir/node"
|
||||
source "$node_shim_DIR"/node.common
|
||||
|
||||
node_bin="$node_shim_DIR/../../$nodejs_binary_dir/node"
|
||||
|
||||
exec "$node_bin" "$@"
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
node_common_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# Fix for https://www.shellcheck.net/wiki/SC2148
|
||||
# shellcheck shell=bash
|
||||
|
||||
node_common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# FIXME this shouldn't be hardcoded here of course
|
||||
nodejs_binary_dir="$node_common_DIR/../binaries/node-v22.15.1-linux-x64/bin"
|
||||
@@ -6,7 +9,6 @@ nodejs_binary_dir="$node_common_DIR/../binaries/node-v22.15.1-linux-x64/bin"
|
||||
# This might be too restrictive. Or not restrictive enough.
|
||||
PATH="$nodejs_binary_dir":/bin:/usr/bin
|
||||
|
||||
|
||||
project_root="$node_common_DIR/../.."
|
||||
|
||||
node_dir="$project_root/$nodejs_binary_dir"
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
npm_shim_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export npm_shim_DIR
|
||||
|
||||
source "$DIR"/node.common
|
||||
# shellcheck source=node.common
|
||||
source "$npm_shim_DIR"/node.common
|
||||
|
||||
cd $DIR/../.nodejs-config
|
||||
echo in dir $(pwd)
|
||||
cd "$npm_shim_DIR"/../.nodejs-config
|
||||
echo in dir "$(pwd)"
|
||||
npm "$@"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,11 +2,15 @@
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
pnpm_shim_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export pnpm_shim_DIR
|
||||
|
||||
source "$DIR"/node.common
|
||||
source "$DIR"/common
|
||||
# shellcheck source=./node.common
|
||||
source "$pnpm_shim_DIR"/node.common
|
||||
|
||||
cd $ROOT/framework/node
|
||||
# shellcheck source=./common
|
||||
source "$pnpm_shim_DIR"/common
|
||||
|
||||
exec "$DIR"/../binaries/pnpm "$@"
|
||||
# cd $ROOT/framework/node
|
||||
|
||||
exec "$pnpm_shim_DIR"/../binaries/pnpm "$@"
|
||||
|
||||
Reference in New Issue
Block a user