File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # Usage: ciel-switchmirror <mirror name in apt-gen-list >
2
+ # Usage: ciel-switchmirror <mirror name in oma mirror >
3
3
4
4
export CIEL_INST=" ciel--switchmirror--"
5
5
6
6
ciel add " $CIEL_INST "
7
- echo -e " \e[1m\e[96m[switch-mirror]:\e[0m\e[1m Mirror set to '$1 '\e[0m"
8
- ciel shell " apt-gen-list set-mirror $1 "
7
+ if [ " $1 " != " " ]; then
8
+ ciel shell oma mirror add " $1 "
9
+ if [ " $? " != " 0" ]; then
10
+ echo -e " \e[1m\e[91m[switch-mirror]:\e[0m\e[1m Failed to set mirror '$1 '.\e[0m"
11
+ echo -e " \e[1m\e[91m[switch-mirror]:\e[0m\e[1m More information please refer to the error oma had reported.\e[0m"
12
+ exit 1
13
+ else
14
+ echo -e " \e[1m\e[96m[switch-mirror]:\e[0m\e[1m Mirror set to '$1 ' successfully.\e[0m"
15
+ fi
16
+
17
+ else
18
+ ciel shell " oma mirror"
19
+ fi
9
20
ciel factory-reset
10
21
ciel commit
11
22
ciel del " $CIEL_INST "
You can’t perform that action at this time.
0 commit comments