Add vimeasyalign, fixup some Linux scripts
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
curr_script=$(realpath "${BASH_SOURCE[0]}")
|
||||
path_to_add=${devenver_root}/NodeJS/12.22.12/bin
|
||||
echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\"
|
||||
|
||||
PATH=${path_to_add}:${PATH} $@
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
curr_script=$(realpath "${BASH_SOURCE[0]}")
|
||||
path_to_add=${devenver_root}/NodeJS/16.19.0/bin
|
||||
echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\"
|
||||
|
||||
PATH=${path_to_add}:${PATH} $@
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
curr_script=$(realpath "${BASH_SOURCE[0]}")
|
||||
path_to_add=${devenver_root}/NodeJS/18.15.0/bin
|
||||
echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\"
|
||||
|
||||
PATH=${path_to_add}:${PATH} $@
|
||||
|
||||
@@ -1,13 +1,33 @@
|
||||
#!/bin/bash
|
||||
root_path="$devenver_root/NodeJS"
|
||||
|
||||
curr_script=$(realpath "${BASH_SOURCE[0]}")
|
||||
root_path=${devenver_root}/NodeJS
|
||||
path_to_add=${root_path}/$1/bin
|
||||
|
||||
if [ "$1" == "list" ]; then
|
||||
ls ${root_path}
|
||||
else
|
||||
echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\"
|
||||
PATH=${path_to_add}:${PATH} ${@:2}
|
||||
# Check for help argument
|
||||
if [[ "$1" == "help" || "$1" == "" || "$1" == "--help" || "$1" == "/?" ]]; then
|
||||
echo "USAGE: node_env.sh <version> <command>"
|
||||
echo
|
||||
echo "VERSIONS:"
|
||||
ls "$root_path"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if a version is provided
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Error: No version specified."
|
||||
echo "USAGE: node_env.sh <version> <command>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract the version and remaining arguments
|
||||
version="$1"
|
||||
shift
|
||||
remaining_args="$@"
|
||||
|
||||
# Construct the command to execute
|
||||
bin_path="$root_path/$version/bin"
|
||||
command="$bin_path/$remaining_args"
|
||||
|
||||
# Execute the command
|
||||
echo "[SCRIPT] Executing $command"
|
||||
|
||||
PATH=${bin_path}:${PATH}
|
||||
$command
|
||||
|
||||
Reference in New Issue
Block a user