This repository was archived by the owner on Jun 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/sh
22# tar wechat-dev-tools
33
4- param1=$1
4+ param1=${1:- " pack" }
5+ echo $param1
6+
57cd ` dirname $0 ` /..
68
79cur_dir=$( pwd)
@@ -19,7 +21,7 @@ dist_wechat_dir="wechat-dev-tools-xsp"
1921dist_wechat_package=" wechat-v${wechat_v} -nwjs-v${nwjs_v} .tar.gz"
2022
2123if [ $param1 = " install" ]; then
22- echo " asd "
24+ echo " install "
2325 # rm -rf $tmp_dir
2426fi
2527
@@ -49,9 +51,17 @@ if [ $param1 = "install" ]; then
4951 cd " $cur_dir /dist"
5052 ln -s " $cur_dir /package.nw"
5153 sh scripts/install.sh
52- # rm -rf $tmp_dir
53- else
54+ elif [ $param1 = " build" ]; then
55+ cp -r " $nwjs_dir " /* " $cur_dir /scripts" " $cur_dir /dist"
56+ cd " $cur_dir /dist"
57+ ln -s " $cur_dir /package.nw"
58+ elif [ $param1 = " pack" ]; then
5459 cp -r " $nwjs_dir " /* " $cur_dir /package.nw" " $cur_dir /scripts" " $cur_dir /dist"
5560 mkdir -p $tmp_dir /build
5661 tar -zcvf " $tmp_dir /build/$dist_wechat_package " -C " $cur_dir " dist
62+ else
63+ echo " 不支持$param1 操作"
64+ exit 127
5765fi
66+ echo " $param1 success"
67+
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ linux下使用微信web开发者工具.
1818### 如果不需要小程序开发
1919``` console
2020git clone git@github.com:cytle/wechat_web_devtools.git
21- cd wechat_web_devtools/dist && ./nw
21+ cd wechat_web_devtools && sh ./bin/pack.sh build
22+ cd dist && ./nw
2223```
2324
2425### 需要小程序开发
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ dev_tools_config_dir="$HOME/.config/微信web开发者工具"
77
88rm -rf $dev_tools_config_dir
99
10- # TODO close nw
1110./nw &
1211nw_pid=$!
1312
You can’t perform that action at this time.
0 commit comments