diff --git a/bashUtils/ensureDependency.sh b/bashUtils/ensureDependency.sh index eee8d2c..fda5766 100755 --- a/bashUtils/ensureDependency.sh +++ b/bashUtils/ensureDependency.sh @@ -9,6 +9,16 @@ for osDependency in $OS_DEPENDENCIES ; do done +if ! hash rustup ; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +fi + + +if [[ -e ~/.cargo/bin/rustup ]]; then + export PATH="~/.cargo/bin:${PATH}" +fi + + if [[ -e $ASDF_DIR/asdf.sh ]]; then diff --git a/helpers/jjEnsure.ts b/helpers/jjEnsure.ts index 8473363..b8ba300 100755 --- a/helpers/jjEnsure.ts +++ b/helpers/jjEnsure.ts @@ -200,6 +200,14 @@ export const jjEnsure = async ({ returnProcessEnvs = false }) => { path: "cli/help.ts", }, }, + c: { + desc: "Command", + mainTitle: "c", + postCommand: "", + maxLength: 12, + keys: [ + ], + }, secrets: { desc: "Secrets", mainTitle: "Secrets", diff --git a/jj.sh b/jj.sh index 5a23a1f..c8990f1 100755 --- a/jj.sh +++ b/jj.sh @@ -23,6 +23,11 @@ export JJ_DATA_DIR="$HOME/.jjDataDir" mkdir -p $JJ_DATA_DIR +if [[ -e ~/.cargo/bin/rustup ]]; then + export PATH="~/.cargo/bin:${PATH}" +fi + + jjCpmmandRunPoint=$(echo ${BASH_SOURCE[0]}) @@ -47,6 +52,15 @@ export JJ_SOURCE_DIR=$(findJJSource) +if [[ -e ~/.bun/bin/bun ]]; then + export PATH="~/.bun/bin:${PATH}" +fi + + + +if [[ -e ~/.cargo/bin/rustup ]]; then + export PATH="~/.cargo/bin:${PATH}" +fi if [[ "$1" == "help" ]]; then @@ -59,9 +73,9 @@ if [[ "$1" == "help" ]]; then fi -if [[ -e ~/.bun/bin/bun ]]; then - export PATH="~/.bun/bin:${PATH}" -fi + + + __bunVersionExpect="1.1.34" __currentBunVersion=$(bun --version || true) @@ -91,6 +105,9 @@ if [[ -e "$JJ_DATA_DIR/~~tmp/shEnvs.sh" ]]; then fi + + + if [[ ! -e "$JJ_DATA_DIR/~~tmp/shEnvs.sh" ]] \ || [[ -z $JJ_WORKSPACE_DIR ]] \ || jjIsFileNewerFile "$JJ_WORKSPACE_DIR/jj.yaml" "$JJ_DATA_DIR/~~tmp/shEnvs.sh" \ @@ -127,6 +144,14 @@ fi source "$JJ_SOURCE_DIR/bashUtils/ensureDependency.sh" + + +if [[ "$1" == "c" ]]; then + "${@:2}" + exit 0 +fi + + # echo 2 # # exit 0 # ${JJ_SOURCE_DIR}/helpers/jjCliYargs.ts $@ cli @@ -136,6 +161,7 @@ set -- $(echo $JJ_CLI_COMMANDS) # echo $JJ_CLI_ADDITIONAL_ARGS_COMMA_SEPTATE + if [[ "$JJ_CLI_SCRIPT_TO_RUN_TYPE" == "bash" ]]; then cd $JJ_CLI_SCRIPT_TO_RUN_PRE_PATH ./${JJ_CLI_SCRIPT_TO_RUN_PATH} diff --git a/package.json b/package.json index 4b88a99..e119eb8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jj-command-line", "description": "jj cli", - "version": "1.0.21", + "version": "1.0.22", "author": "Jason Jafari", "bin": { "jj": "./jj.sh"