-
Notifications
You must be signed in to change notification settings - Fork 76
/
.bashrc-remote
executable file
·33 lines (29 loc) · 1.03 KB
/
.bashrc-remote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
if test -z "$LOCALIP"; then
export LOCALIP=`echo $SSH_CONNECTION|awk '{print $3}'|sed -e 's/.*://'`
fi
if test -z "$LOCALPORT"; then
export LOCALPORT=`echo $SSH_CONNECTION|awk '{print $4}'`
fi
export WHOAMI=${USER:-`whoami`}
if test -z "$REMOTEIP"; then
export REMOTEIP=`echo ${SSH_CLIENT} | awk '{print $1}'|perl -npe 's/.*://'`
fi
if test "$DISPLAY"; then
echo export REMOTEIP=$REMOTEIP > ~/.remoteip
fi
export PS1HOSTNAME=${PS1HOSTNAME:-`hostname`}
export PS1='\n{ $USER@$PS1HOSTNAME [01;32m| \w |[0m [01;34mRemote[01;31m:[01;34mTrue '\$PROMPT_ANDROID_INFO\$PROMPT_RET\$RECURSIVE_SHELL\$SC_HOME_PROMPT'[0m}\n\$'
if test "$TERM" = dumb; then
export PS1='\$'
fi
if test -e ~/.config/system-config/.bashrc-path -a -e ~/.kill-bt; then
(
. ~/.config/system-config/.bashrc-path
if ps.pl transmission-cli >/dev/null 2>&1 && yes-or-no-p "Kill transmission-cli?"; then
ps-killall transmission-cli
fi
)
fi
. ~/system-config/.bashrc-ssh-agent
. ~/system-config/.profile