Skip to content

Commit

Permalink
ubuntu: fix sed command
Browse files Browse the repository at this point in the history
/etc/apt/sources.list always exists, so OR (||) won't work.
  • Loading branch information
taoky committed May 10, 2024
1 parent fff6213 commit b481a19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ FROM ubuntu:$tag
RUN sed -i \
-e 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' \
-e 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' \
/etc/apt/sources.list || \
/etc/apt/sources.list; \
sed -i \
-e 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' \
-e 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' \
/etc/apt/sources.list.d/ubuntu.sources
/etc/apt/sources.list.d/ubuntu.sources || true
EOF
docker build -f $dockerfile -t ustclug/ubuntu:$tag .
docker push ustclug/ubuntu:$tag
Expand Down

0 comments on commit b481a19

Please sign in to comment.