Skip to content

Commit

Permalink
调整目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
炒饭 committed Mar 27, 2017
1 parent 396c8aa commit 12fe977
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 44 deletions.
File renamed without changes.
41 changes: 41 additions & 0 deletions bin/pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#! /bin/sh
# tar wechat-dev-tools

cd `dirname $0`/..

cur_dir=$(pwd)

. "$cur_dir/bin/build.conf"

tmp_dir="$cur_dir/.tmp"
dist_dir="$cur_dir/dist"

nwjs_file="$tmp_dir/nwjs-v$nwjs_v.tar.gz"
nwjs_dir="$tmp_dir/nwjs-sdk-v${nwjs_v}-linux-x64"
nwjs_download="https://dl.nwjs.io/v$nwjs_v/nwjs-sdk-v${nwjs_v}-linux-x64.tar.gz"

dist_wechat_dir="wechat-dev-tools-xsp"
dist_wechat_package="wechat-v${wechat_v}-nwjs-v${nwjs_v}.tar.gz"


mkdir -p $tmp_dir
if [ ! -d "$nwjs_dir" ]; then
if [ ! -f "$nwjs_file" ]; then
wget "$nwjs_download" -O $nwjs_file
$? -ne 0 && exit "$?"
fi

tar -xf $nwjs_file -C $tmp_dir
$? -ne 0 && exit "$?"
cd "$nwjs_dir/locales" || exit "$?"
rm $(ls -I "zh*" -I "en*" )
cd "$cur_dir"
fi

rm -rf $cur_dir/dist
mkdir -p $cur_dir/dist
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
44 changes: 0 additions & 44 deletions pack.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 12fe977

Please sign in to comment.