forked from billy3321/lazyscripts_pool_debian_ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 2
/
add-apt-sources
56 lines (51 loc) · 2.48 KB
/
add-apt-sources
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
#!/bin/bash
# -*- coding: utf-8 -*-
# Copyright (C) 2008 林哲瑋 Zhe-Wei Lin (billy3321,雨蒼) <billy3321 -AT- gmail.com>
# Last Modified: 29 Dec 2008
# Released under GNU General Public License
# Declare 2 functions for adding medibuntu and ubuntu tweak source
# Please run as root.
function add_medibuntu() {
HAS_MEDIBUNTU=`grep 'deb http://packages.medibuntu.org/' /etc/apt/sources.list`
if [ -z "$HAS_MEDIBUNTU" ]; then
# FIXME: We should check the codename of ubuntu here: dapper, feisty or gutsy?
echo -e "#the source of Medibuntu (Lazybuntu 新增)\ndeb http://packages.medibuntu.org/ $DISTRIB_CODENAME free non-free" | sudo tee -a /etc/apt/sources.list
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update
else
echo 'Medibuntu 套件庫已經存在'
fi
}
function add_ubuntu_tweak() {
HAS_UBUNTU_TWEAK=`grep 'deb http://ppa.launchpad.net/tualatrix/ubuntu' /etc/apt/sources.list`
if [ -z "$HAS_UBUNTU_TWEAK" ]; then
if [ "$DISTRIB_CODENAME" = 'intrepid' ];then
echo -e "\n#the source of Ubuntu Tweak (Lazybuntu 新增)\ndeb http://ppa.launchpad.net/tualatrix/ubuntu intrepid main \ndeb-src http://ppa.launchpad.net/tualatrix/ubuntu intrepid main" | sudo tee -a /etc/apt/sources.list
else
echo -e "\n#the source of Ubuntu Tweak (Lazybuntu 新增)\ndeb http://ppa.launchpad.net/tualatrix/ubuntu hardy main \ndeb-src http://ppa.launchpad.net/tualatrix/ubuntu hardy main" | sudo tee -a /etc/apt/sources.list
fi
# wget -q http://ppa.launchpad.net/tualatrix/??-key.gpg -O- | sudo apt-key add -
sudo apt-get update
else
echo 'Ubuntu Tweak 套件庫已經存在'
fi
}
function add_swiftfox() {
HAS_SWIFTFOX=`grep swiftfox /etc/apt/sources.list`
if [ -z "$HAS_SWIFTFOX" ]; then
echo -e "#the source of swiftfox (Lazybuntu 新增)\ndeb http://getswiftfox.com/builds/debian unstable non-free" >> /etc/apt/sources.list
apt-get update
else
echo 'Swifrfox 套件庫已經存在'
fi
}
function add_winehq() {
HAS_WINEHQ=`grep 'deb http://wine.budgetdedicated.com/apt' /etc/apt/sources.list`
if [ -z "$HAS_WINEHQ" ]; then
# FIXME: We should check the codename of ubuntu here: dapper, feisty or gutsy?
echo -e "#the source of WineHQ Apt (Lazybuntu 新增)\ndeb http://wine.budgetdedicated.com/apt $DISTRIB_CODENAME main" | sudo tee -a /etc/apt/sources.list
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add - && sudo apt-get update
else
echo 'WineHQ 套件庫已經存在'
fi
}
#END