diff options
| author | ruki <[email protected]> | 2019-08-24 08:51:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-08-24 08:51:16 +0800 |
| commit | 75f4eab36fdd0a4bf90ad12a924d6ab153ddbcc1 (patch) | |
| tree | b1fa2c43768c84157104f22adb49bb2c354a6bc3 /scripts | |
| parent | fd3cc28e03bafc484866113e6a72b6cccc542bbb (diff) | |
improve archive scripts
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/archive-all.sh | 26 | ||||
| -rwxr-xr-x | scripts/makeself/build-runfile.sh | 14 |
2 files changed, 22 insertions, 18 deletions
diff --git a/scripts/archive-all.sh b/scripts/archive-all.sh index d2f5a855f..fc8bbc1b5 100755 --- a/scripts/archive-all.sh +++ b/scripts/archive-all.sh @@ -15,19 +15,21 @@ git reset --hard HEAD git clean -dfX git submodule foreach git clean -dfX -# prepare files -xmake l -v private.utils.bcsave -s -o $tmpdir/repo/output $tmpdir/repo/xmake +# copy files to tmpdir/xmake +mkdir -p $tmpdir/xmake/scripts +xmake l -v private.utils.bcsave -s -o $tmpdir/repo/bcxmake $tmpdir/repo/xmake || exit cd $tmpdir/repo || exit -version=`cat core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"` -outputfile=$xmakeroot/xmake-v$version -rm -rf xmake -mv output xmake -rm -rf tests -rm -rf core/src/tbox/tbox/src/demo -cd core/src/tbox/tbox -cd $tmpdir/repo || exit -rm -rf `find ./ -name ".git"` -ls -a -l +cp -r ./core $tmpdir/xmake +mv bcxmake $tmpdir/xmake/xmake +cp ./scripts/get.sh $tmpdir/xmake/scripts +cp ./*.md $tmpdir/xmake +cp makefile $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 diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 6662eded3..a34fba938 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -10,21 +10,23 @@ if [ -d $tmpdir ]; then fi mkdir -p $tmpdir -# copy xmake repo to tmpdir/xmake-repo, remove git ignored files -cp -r $xmakeroot $tmpdir/xmake-repo -cd $tmpdir/xmake-repo +# copy xmake repo to tmpdir/repo, remove git ignored files +cp -r $xmakeroot $tmpdir/repo +cd $tmpdir/repo || exit +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/xmake-repo +xmake l -v private.utils.bcsave -s -o $tmpdir/repo/bcxmake $tmpdir/repo/xmake || exit +cd $tmpdir/repo || exit cp -r ./core $tmpdir/xmake -cp -r ./xmake $tmpdir/xmake +mv bcxmake $tmpdir/xmake/xmake cp ./scripts/get.sh $tmpdir/xmake/scripts cp ./*.md $tmpdir/xmake cp makefile $tmpdir/xmake -cd $tmpdir/xmake +cd $tmpdir/xmake || exit rm -rf ./core/src/tbox/tbox/src/demo rm -rf ./core/src/tbox/tbox/src/tbox/platform/windows rm -rf ./core/src/pdcurses |
