diff --git a/tools/alpine.sh b/tools/alpine.sh index 0879e84..89442a4 100755 --- a/tools/alpine.sh +++ b/tools/alpine.sh @@ -5,8 +5,7 @@ set -e set_mirror() { MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"} - MIRROR=${MIRROR//\//\\\/} - sed -i "s/dl-cdn.alpinelinux.org/$MIRROR/g" /etc/apk/repositories + sed -i "s@dl-cdn.alpinelinux.org@$MIRROR@g" /etc/apk/repositories } apk_add() diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index c9309f9..e6a98cf 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -5,7 +5,6 @@ set -e set_mirror() { MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"} - MIRROR=${MIRROR//\//\\\/} sed -i "s@http://.*archive.ubuntu.com@https://${MIRROR}@g" /etc/apt/sources.list sed -i "s@http://.*security.ubuntu.com@https://${MIRROR}@g" /etc/apt/sources.list } @@ -16,9 +15,14 @@ apt_install() apt-get update for i in {man-db,vim,ca-certificates}; do apt-get install $i -y; done - # mass installation - apt-get install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server htop gcc g++ cmake make zip less bsdmainutils - for i in {fzf,ripgrep}; do apt-get install $i -y; done + # lite + apt-get install -y git zsh bash tmux vim curl inetutils-ping less bsdmainutils + + # full + if [[ -z "$DFS_LITE" ]]; then + apt-get install wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron openssh-client openssh-server htop gcc g++ cmake make zip + for i in {fzf,ripgrep}; do apt-get install -y $i; done + fi } set_timezone()