From 31b4021c72317c6f4ec6a201f4579b3a39c5fca5 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 10:13:09 +0800 Subject: clean up & comments --- scripts/makeself/build-runfile.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'scripts/makeself') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 25f7bd66c..c06b7d433 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -1,22 +1,32 @@ #! /bin/bash +# path constants cd "$(dirname "$0")/../.." xmakeroot=`pwd` buildroot=$xmakeroot/scripts/makeself temproot=/tmp/xmake-makeself # prepare files to pack +# clean up temproot rm -rf $temproot +mkdir -p $temproot + +# copy xmake repo to temproot/xmake-repo, remove git ignored files +cp -Tr $xmakeroot $temproot/xmake-repo +cd $temproot/xmake-repo +git clean -dfX + +# copy files to temproot/xmake mkdir -p $temproot/xmake/scripts +cd $temproot/xmake-repo cp -r ./core $temproot/xmake -cp ./scripts/get.sh $temproot/xmake/scripts +rm -rf ./core/src/tbox/tbox/src/demo +rm -rf ./core/src/pdcurses cp -r ./xmake $temproot/xmake +cp ./scripts/get.sh $temproot/xmake/scripts cp ./*.md $temproot/xmake cp makefile $temproot/xmake cd $temproot/xmake -rm -rf ./core/.xmake ./core/build -rm -rf ./core/src/tbox/tbox/src/demo -rm -rf ./core/src/pdcurses # prepare info texts cd $temproot @@ -25,12 +35,10 @@ version=`cat ./xmake/core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\ sed -i "s/#xmake-version#/$version/g" ./header sed -i "s/#xmake-version#/$version/g" ./lsm -# install makeself +# make run file cd $temproot wget https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run -O ./makeself-2.4.0.run sh ./makeself-2.4.0.run - -# make runfile ./makeself-2.4.0/makeself.sh \ --sha256 \ --lsm ./lsm \ -- cgit v1.3.1