summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-19 10:13:09 +0800
committerOpportunityLiu <[email protected]>2019-07-19 10:13:09 +0800
commit31b4021c72317c6f4ec6a201f4579b3a39c5fca5 (patch)
treec60a986b1e9ccd4775ccea40b788c2e09aae2fa7 /scripts
parent744dc38142fd90c1a4c3bdd4e645ce46d16de45e (diff)
clean up & comments
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/makeself/build-runfile.sh22
1 files changed, 15 insertions, 7 deletions
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 \