From af7f46a7079cdbfc4e7b669460c86b711646bac0 Mon Sep 17 00:00:00 2001 From: Fredrik Noring <noring@nocrew.org> Date: Wed, 9 Aug 2000 17:12:38 +0200 Subject: [PATCH] New cool stuff. Rev: NT/init_nt:1.27 --- NT/init_nt | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/NT/init_nt b/NT/init_nt index 02e5b4a8aa..efd7f47f41 100755 --- a/NT/init_nt +++ b/NT/init_nt @@ -1,8 +1,9 @@ #!/bin/sh # Support local settings. -if [ -f "$HOME/.init_ntrc" ]; then - . "$HOME/.init_ntrc" +INIT_NTRC=${INIT_NTRC-"$HOME/.init_ntrc"} +if [ -f "$INIT_NTRC" ]; then + . "$INIT_NTRC" fi #This can be 'sprsh', 'wine' or 'cygwin' @@ -154,22 +155,27 @@ export NTHOST NTDRIVE NTCC CC PATH NTTOOLS MNTREPLACE MNTREPLACE export NTPORT USE_SPRSH NTMOUNT IFS REMOTE_METHOD watcom INCLUDE export NT_TOOL_PATH NTCOMPILER PIKE_PATH_TRANSLATE -case /$SHELL-$TERM in - */bash-xterm) - PROMPT_COMMAND="echo -n ]2\; $REMOTE_METHOD NT compile ]1\; $CC" - export PROMPT_COMMAND - ;; -esac +if [ "$#" = "0" ]; then + case /$SHELL-$TERM in + */bash-xterm) + PROMPT_COMMAND="echo -n ]2\; $REMOTE_METHOD NT compile ]1\; $CC" + export PROMPT_COMMAND + ;; + esac + + case /$0 in + */init_nt) + case /$SHELL in + */bash) + exec $SHELL -rcfile $NT_TOOL_PATH/bash-fixup + ;; + *) + exec $SHELL + ;; + esac + ;; + esac +else + exec "$@" +fi -case /$0 in - */init_nt) - case /$SHELL in - */bash) - exec $SHELL -rcfile $NT_TOOL_PATH/bash-fixup - ;; - *) - exec $SHELL - ;; - esac - ;; -esac -- GitLab