diff options
| author | OpportunityLiu <[email protected]> | 2020-01-21 21:16:01 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2020-01-21 21:17:04 +0800 |
| commit | b3b337d70b5463ad9c2e9696539d7cdf5c91697d (patch) | |
| tree | 20155a58e3b3351627ef2b45e6f396cf9f09874d /scripts/archive-all | |
| parent | 192d6debac6c6c5498c31af2461e1902d4e16b81 (diff) | |
pack register-completions.sh
Diffstat (limited to 'scripts/archive-all')
| -rw-r--r-- | scripts/archive-all | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/scripts/archive-all b/scripts/archive-all new file mode 100644 index 000000000..bd9be43a7 --- /dev/null +++ b/scripts/archive-all @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# ./scripts/archive-all +tmpdir=/tmp/.xmake_archive +xmakeroot=`pwd` +if [ -d $tmpdir ]; then + rm -rf $tmpdir +fi +mkdir $tmpdir + +# clone xmake repo +cp -r $xmakeroot $tmpdir/repo +cd $tmpdir/repo +git reset --hard HEAD +git clean -dfX +git submodule foreach git clean -dfX + +# copy files to tmpdir/xmake +mkdir -p $tmpdir/xmake/scripts +cd $tmpdir/repo || exit +xmake l -v private.utils.bcsave --rootname='@programdir' -x 'scripts/**|templates/**' xmake || exit +cp -r ./core $tmpdir/xmake +cp -r ./xmake $tmpdir/xmake/xmake +cp ./scripts/*.sh $tmpdir/xmake/scripts +cp ./*.md $tmpdir/xmake +cp makefile $tmpdir/xmake +cp install $tmpdir/xmake +cd $tmpdir/xmake || exit +rm -rf ./core/src/tbox/tbox/src/demo + +# archive files +version=`cat ./core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"` +outputfile=$xmakeroot/"xmake-v$version" +if [ -f "$outputfile.zip" ]; then + rm "$outputfile.zip" +fi +if [ -f "$outputfile.7z" ]; then + rm "$outputfile.7z" +fi +if [ -f "$outputfile.tar.gz" ]; then + rm "$outputfile.tar.gz" +fi +zip -qr "$outputfile.zip" . +7z a "$outputfile.7z" . +tar -czf "$outputfile.tar.gz" . +shasum -a 256 "$outputfile.zip" +shasum -a 256 "$outputfile.7z" +shasum -a 256 "$outputfile.tar.gz" +ls -l "$outputfile.zip" +ls -l "$outputfile.7z" +ls -l "$outputfile.tar.gz" |
