Update shell code
Now it (mostly) passes shellcheck and is formatted with shfmt.
This commit is contained in:
@@ -11,4 +11,4 @@ source "$check_dir"/../framework/shims/node.common
|
|||||||
|
|
||||||
# $ROOT/cmd pnpm tsc --lib ES2023 --esModuleInterop -w $check_dir/app.ts
|
# $ROOT/cmd pnpm tsc --lib ES2023 --esModuleInterop -w $check_dir/app.ts
|
||||||
# $ROOT/cmd pnpm tsc -w $check_dir/app.ts
|
# $ROOT/cmd pnpm tsc -w $check_dir/app.ts
|
||||||
$ROOT/cmd pnpm tsc -w --project ./tsconfig.json
|
$ROOT/cmd pnpm tsc --watch --project ./tsconfig.json
|
||||||
|
|||||||
@@ -11,11 +11,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
# download $nodejs_version
|
# download $nodejs_version
|
||||||
# verify its checksum against $nodejs_checksum
|
# verify its checksum against $nodejs_checksum
|
||||||
|
|
||||||
|
cd "$DIR/../node"
|
||||||
|
|
||||||
|
"$DIR"/pnpm install
|
||||||
|
|
||||||
cd $DIR/../node
|
|
||||||
|
|
||||||
$DIR/pnpm install
|
|
||||||
|
|
||||||
echo we will download other files here later
|
echo we will download other files here later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
# Fix for https://www.shellcheck.net/wiki/SC2148
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
ROOT="$common_DIR/../../"
|
export ROOT="$common_DIR/../../"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,13 @@
|
|||||||
|
|
||||||
set -eu
|
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" "$@"
|
exec "$node_bin" "$@"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Fix for https://www.shellcheck.net/wiki/SC2148
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
node_common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
node_common_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
# FIXME this shouldn't be hardcoded here of course
|
# FIXME this shouldn't be hardcoded here of course
|
||||||
@@ -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.
|
# This might be too restrictive. Or not restrictive enough.
|
||||||
PATH="$nodejs_binary_dir":/bin:/usr/bin
|
PATH="$nodejs_binary_dir":/bin:/usr/bin
|
||||||
|
|
||||||
|
|
||||||
project_root="$node_common_DIR/../.."
|
project_root="$node_common_DIR/../.."
|
||||||
|
|
||||||
node_dir="$project_root/$nodejs_binary_dir"
|
node_dir="$project_root/$nodejs_binary_dir"
|
||||||
|
|||||||
@@ -2,14 +2,12 @@
|
|||||||
|
|
||||||
set -eu
|
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
|
cd "$npm_shim_DIR"/../.nodejs-config
|
||||||
echo in dir $(pwd)
|
echo in dir "$(pwd)"
|
||||||
npm "$@"
|
npm "$@"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
|
|
||||||
set -eu
|
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
|
# shellcheck source=./node.common
|
||||||
source "$DIR"/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