blob: 640f5624d1a3b8131c4944cdd9f8f543d359a281 (
plain) (
blame)
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
34
35
36
|
#!/bin/bash
#
# SunHPC Env Configure
#
command -v vim > /dev/null
if [ $? -eq 0 ]
then
alias vi=vim
VICONF="$HOME/.vimrc"
[ ! -f "$VICONF" ] && echo -e "set ts=4\nset expandtab" > "$VICONF"
fi
export SUNHPC_HOME=/opt/sunhpc
export SUNHPC_PYTHON=/opt/sunpy3
if [ `id -g` == 0 ];then
export PATH=$SUNHPC_HOME/bin:$SUNHPC_HOME/sbin:$SUNHPC_PYTHON/bin:$SUNHPC_PYTHON/sbin$PATH
else
export PATH=$SUNHPC_HOME/bin:$PATH
fi
# python .pth config
SUNHPC_PTH=/opt/sunpy3/lib/python3.12/site-packages/sunhpc.pth
#SUNHPC_PTH=/opt/sunpy3/lib/python3.10/site-packages/sunhpc.pth
[ ! -e $SUNHPC_PTH ] && echo "$SUNHPC_HOME/lib" > $SUNHPC_PTH
# pip
[ ! -d ~/.pip ] && mkdir -p ~/.pip
cat > ~/.pip/pip.conf << 'EOF'
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn/simple
EOF
|