Skip to content

Commit

Permalink
change:readme 更新安装说明
Browse files Browse the repository at this point in the history
  • Loading branch information
炒饭 committed Mar 30, 2017
1 parent 7466e86 commit 5804c4a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
18 changes: 14 additions & 4 deletions bin/pack.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#! /bin/sh
# tar wechat-dev-tools

param1=$1
param1=${1:-"pack"}
echo $param1

cd `dirname $0`/..

cur_dir=$(pwd)
Expand All @@ -19,7 +21,7 @@ dist_wechat_dir="wechat-dev-tools-xsp"
dist_wechat_package="wechat-v${wechat_v}-nwjs-v${nwjs_v}.tar.gz"

if [ $param1 = "install" ]; then
echo "asd"
echo "install"
# rm -rf $tmp_dir
fi

Expand Down Expand Up @@ -49,9 +51,17 @@ if [ $param1 = "install" ]; then
cd "$cur_dir/dist"
ln -s "$cur_dir/package.nw"
sh scripts/install.sh
# rm -rf $tmp_dir
else
elif [ $param1 = "build" ]; then
cp -r "$nwjs_dir"/* "$cur_dir/scripts" "$cur_dir/dist"
cd "$cur_dir/dist"
ln -s "$cur_dir/package.nw"
elif [ $param1 = "pack" ]; then
cp -r "$nwjs_dir"/* "$cur_dir/package.nw" "$cur_dir/scripts" "$cur_dir/dist"
mkdir -p $tmp_dir/build
tar -zcvf "$tmp_dir/build/$dist_wechat_package" -C "$cur_dir" dist
else
echo "不支持$param1操作"
exit 127
fi
echo "$param1 success"

3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ linux下使用微信web开发者工具.
### 如果不需要小程序开发
```console
git clone [email protected]:cytle/wechat_web_devtools.git
cd wechat_web_devtools/dist && ./nw
cd wechat_web_devtools && sh ./bin/pack.sh build
cd dist && ./nw
```

### 需要小程序开发
Expand Down
1 change: 0 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dev_tools_config_dir="$HOME/.config/微信web开发者工具"

rm -rf $dev_tools_config_dir

# TODO close nw
./nw &
nw_pid=$!

Expand Down

0 comments on commit 5804c4a

Please sign in to comment.