Skip to content

Commit

Permalink
1. 修改安装链接
Browse files Browse the repository at this point in the history
2. 更新文档
  • Loading branch information
taikulawo committed Sep 8, 2019
1 parent b61fbfa commit 7413c94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- aufs作为底层文件系统与镜像的实现

### 如何安装
`bash <(curl -s https://raw.githubusercontent.com/iamwwc/wwcdocker/master/install.sh)`
`source <(curl -s -L https://raw.githubusercontent.com/iamwwc/wwcdocker/master/install.sh)`

### 开发
默认在 `dev` 分支开发,开发完成,测试通过之后会发布至 `master` 分支,并构建 `release`
Expand Down
12 changes: 11 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
# https://raw.githubusercontent.com/iamwwc/wwcdocker/master/install.sh

# TO INSTALL this script, run following
# bash <(curl -s https://raw.githubusercontent.com/iamwwc/wwcdocker/master/install.sh)
# source <(curl -s -L https://raw.githubusercontent.com/iamwwc/wwcdocker/master/install.sh)

red='\033[0;31m'
plain='\033[0m'

[[ $EUID -ne 0 ]] && echo -e "[${red}Error${plain}] This script must be run as root!" && exit 1

beforepath=$(pwd)

tempdir="/tmp/wwcdockertempdir${RANDOM}"

mkdir $tempdir -p

cd $tempdir

# download wwcdocker binary
curl -s https://api.github.com/repos/iamwwc/wwcdocker/releases/latest \
| grep browser_download_url \
Expand All @@ -22,5 +30,7 @@ chmod u+x wwcdocker
#export to path
export PATH=$PATH:${cwd}

cd $beforepath

green='\033[0;32m'
echo -e "${green}Type wwcdocker for help :)${plain}"

0 comments on commit 7413c94

Please sign in to comment.