/
postmkvirtualenv
executable file
·60 lines (46 loc) · 1.28 KB
/
postmkvirtualenv
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash -e
if [ -f $VIRTUAL_ENV/bin/activate ]; then
echo "Creating .../src"
mkdir -p ${VIRTUAL_ENV}/src
cd ${VIRTUAL_ENV}/src
PROGS=""
if [ "${BARE}" == "" ]; then
PROGS="$PROGS setuptools-git ipython"
fi
echo -n "Installing packages:"
for progname in $PROGS; do
progsrc=$HOME/src/$progname
if [ -f $progsrc ]; then
echo -n " $progname"
(
cd $progsrc
easy_install .
) >/dev/null 2>&1
fi
done
echo ""
echo "Installing screenrc."
cat > ${VIRTUAL_ENV}/screenrc <<EOF
# Draw bar across bottom with window names and system CPU load
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %l %{..Y} %m/%d %C%a "
# Let me scroll back a thousand lines or so.
defscrollback 1024
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo mlterm 'Co#256:AB=E[48;5;%dm:AF=E[38;5;%dm'
# erase background with current bg color
defbce "on"
nethack on
# Automatically start up a bunch of windows.
screen -t "shell" 0 bash --rcfile ${WORKON_HOME}/postactivate
# Further examples
#screen -t "code" 1
#screen -t "tests" 2
#chdir docs
#screen -t "docs" 3
EOF
fi