mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-23 20:38:16 +08:00
[refactor] clean, readable (#19)
* rebase zshrc, introduce DFS_NO_WALL * improve ci * improve ci * improve ci * update antigen url for DFS_NO_WALL * OK * improve ci for macos * improve test.zsh * staged * fix ci * fix ci * use local vars * introduce DFS_QUIET * mass mod install.sh * minor change * set DFS_DEV=1 to prevent update * debug: done -> fi * fix DFS_DEV * ubuntu.sh: set-mirror (ref: tuna) * preinstall_check * install.sh: -q to be quiet * install.sh: -d to DFS_DEV Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
@@ -4,10 +4,9 @@ set -e
|
||||
|
||||
set_mirror()
|
||||
{
|
||||
#MIRROR=${1:="mirrors.tuna.tsinghua.edu.cn"}
|
||||
#MIRROR=${MIRROR//\//\\\/}
|
||||
#sed -i 's/(archive|security).ubuntu.com/${MIRROR}/g' /etc/apt/sources.list
|
||||
echo "to-do ..."
|
||||
MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"}
|
||||
MIRROR=${MIRROR//\//\\\/}
|
||||
sed -i "s/dl-cdn.alpinelinux.org/$MIRROR/g" /etc/apk/repositories
|
||||
}
|
||||
|
||||
apk_add()
|
||||
@@ -32,7 +31,7 @@ router()
|
||||
case $1 in
|
||||
apk-add ) apk_add ;;
|
||||
set-timezone | set-tz ) set_timezone ;;
|
||||
#set-mirror ) set_mirror $2 ;;
|
||||
set-mirror ) set_mirror $2 ;;
|
||||
* ) echo unknown command "$1". available: apk-add, set-timezone;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user