forked from baohaojun/system-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.config-ubuntu.sh
38 lines (32 loc) · 1.17 KB
/
.config-ubuntu.sh
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
#!/bin/bash
set -e
if test `whoami` = root; then
echo 'You must not run this script as root!'
exit -1
fi
sudo bash -c "cat <<EOF > /etc/apt/sources.list
deb http://192.168.0.46/ubuntu/ lucid main restricted universe multiverse
deb-src http://192.168.0.46/ubuntu/ lucid main restricted universe multiverse
deb http://192.168.0.46/ubuntu/ lucid-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
EOF"
sudo apt-get update
sudo apt-get install -y git-core ssh subversion vim
cd ~
git clone git://192.168.0.46/git/system-config.git || (cd ~/system-config && git pull)
cd ~/system-config
git checkout -- .
./bin/after-co-ln-s.sh
sudo apt-get install -y lftp
mkdir -p ~/external
ln -sf ~/external ~/bin/Linux/ext
cd ~/bin/Linux/ext
lftp -c "mirror -c http://192.168.0.46/google"
tar zxfv ./google/android-sdk_r06-linux_86.tgz
mkdir -p ~/external/bin/Linux/ext/android-sdk-linux_86/temp
cd ~/external/bin/Linux/ext/android-sdk-linux_86/temp
ln ../../google/* .
. ~/.bashrc
~/external/bin/Linux/ext/android-sdk-linux_86/tools/android&
~/bin/Linux/after-check-out.sh
echo 'OK, your configuration has completed!'