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
#!/bin/bash
echo "Print the rep in use"
zypper lr -u

#Define openSUSE Version
VERSION=`cat /etc/SuSE-release | grep VERSION | cut -d ' ' -f 3`
echo "This openSUSE version is $VERSION"

echo "Remove Ori Rep"
zypper rr 1
zypper rr 1
zypper rr 1
zypper rr 1
zypper rr 1
zypper rr 1

echo "Add Taiwan's rep "

## for OSS
zypper ar -f http://ftp.twaren.net/Linux/OpenSuSE/distribution/$VERSION/repo/oss
/ Twaren-Oss
#zypper ar -f http://download.opensuse.org/distribution/$VERSION/repo/non-oss/ s
use_non-oss
/ Twaren-Oss
#zypper ar -f http://download.opensuse.org/distribution/$VERSION/repo/non-oss/ s
use_non-oss
#zypper ar -f http://ftp.ncnu.edu.tw/Linux/opensuse/distribution/$VERSION/repo/n
on-oss/ ncnu_non-oss

## for Non-OSS
#zypper ar -f http://ftp.cse.yzu.edu.tw/pub/Linux/openSUSE/distribution/$VERSION
/repo/non-oss/ cse_non-oss
zypper ar -f http://ftp.twaren.net/Linux/OpenSuSE/distribution/$VERSION/repo/non
-oss/ Twaren-Non-oss

## for update
#zypper ar http://ftp.twaren.net/Linux/OpenSuSE/update/$VERSION/repodata/ tware
n_update
zypper ar -f http://ftp.twaren.net/Linux/OpenSuSE/update/$VERSION/ Twaren-Updat
e
#zypper ar -f http://download.opensuse.org/update/$VERSION/ suse_update

## for Pacman Rep
zypper ar -f http://ftp.nchc.org.tw/Linux/Packman/suse/$VERSION/ NCHC-Pacman
#zypper ar -f http://ftp.twaren.net/Linux/Packman/suse/$VERSION/ twaren_packman