5 echo "$CE$N: fatal error: $*$CN" >&2
9 # enable colors only on terminal devices
11 if test -t 0 -a -t 1 -a -n "$TPUT"
13 CI="`$TPUT setf 6 || true`"
14 CE="`$TPUT setf 4 || true`"
15 CX="`$TPUT setf 2 || true`"
16 CN="`$TPUT sgr0 || true`"
24 # default name of the repository
32 # can't do any mirroring without reprepro
36 die "reprepro is not installed. (try: sudo aptitude install reprepro)"
39 # get the user's Single ID
40 if ! email="`git config --global --get user.email`" ||
41 ! echo $email | grep -q '.com$'
43 die "Please setup up your email address first using:
44 git config --global user.email your_id@your_company.com"
46 SINGLE_ID="`echo \"$email\" | cut -d@ -f1`"
49 base="https://download.tizen.org/releases/1.0"
51 # mirror the armel repository
52 #mkdir -p "$dir/apt.sbs/armel/conf"
53 #cat > "$dir/apt.sbs/armel/conf/distributions" <<EOF
54 #Codename: slp2-target
57 #Components: main contrib non-free
59 #Update: slp2-target-update
62 #cat > "$dir/apt.sbs/armel/conf/updates" <<EOF
63 #Name: slp2-target-update
64 #Method: $base/apt.sbs/armel
67 # mirror the i386 repository
68 mkdir -p "$dir/apt.sbs/i386/conf"
69 cat > "$dir/apt.sbs/i386/conf/distributions" <<EOF
73 Components: main contrib non-free
75 Update: slp2-target-update
78 cat > "$dir/apt.sbs/i386/conf/updates" <<EOF
79 Name: slp2-target-update
80 Method: $base/apt.sbs/i386
83 # mirror the tools repository
84 mkdir -p "$dir/apt.sbs/tools/conf"
85 cat > "$dir/apt.sbs/tools/conf/distributions" <<EOF
89 Components: main contrib non-free
91 Update: slp2-tools-update
94 cat > "$dir/apt.sbs/tools/conf/updates" <<EOF
95 Name: slp2-tools-update
96 Method: $base/apt.sbs/tools
99 # mirror the debian/squeeze repository
100 mkdir -p "$dir/mirror/conf"
101 cat > "$dir/mirror/conf/distributions" <<EOF
104 Description: Debian Squeeze
105 Components: main contrib non-free
106 Update: debian-squeeze-update
109 cat > "$dir/mirror/conf/updates" <<EOF
110 Name: debian-squeeze-update
114 # FIXME: filter the list of packages to reduce repository size
115 #FilterList: purge mirror.packages
118 #echo "$CI""Mirroring armel""$CN"
119 #(cd "$dir/apt.sbs/armel" && "$rpp" update)
120 echo "$CI""Mirroring tools""$CN"
121 (cd "$dir/apt.sbs/tools" && "$rpp" update)
122 echo "$CI""Mirroring i386""$CN"
123 (cd "$dir/apt.sbs/i386" && "$rpp" update)
124 echo "$CI""Mirroring Debian""$CN"
125 (cd "$dir/mirror" && "$rpp" update)