summaryrefslogtreecommitdiff
path: root/scripts/makeppa
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-09 00:55:13 +0800
committerruki <[email protected]>2020-09-09 00:55:13 +0800
commit6cd945f6b5268b392e5452a7d89f4807da89f18c (patch)
tree8a92b8f430399f23072e0472d8d93b6c95c42fba /scripts/makeppa
parent95981ed19ba69b2367db5a0e33e2ed80ba811882 (diff)
update makeppa
Diffstat (limited to 'scripts/makeppa')
-rwxr-xr-xscripts/makeppa16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/makeppa b/scripts/makeppa
index 2a8897567..cb4fbe60f 100755
--- a/scripts/makeppa
+++ b/scripts/makeppa
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# check
-if [ $# -lt 1 ]; then
- echo "Usage: ./scripts/makeppa [version] [patch]"
+if [ $# -lt 0 ]; then
+ echo "Usage: ./scripts/makeppa [patch]"
exit
fi
@@ -13,10 +13,10 @@ if [ ! -d $workdir ]; then
fi
# version
-version=$1
+version=`cat ./core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"`
# patch number
-patch="$2"
+patch="$1"
if [ -z $patch ]; then
patch=1
fi
@@ -24,13 +24,15 @@ fi
# tarball
tarball=$workdir/xmake-$version.tar.gz
if [ ! -f $tarball ]; then
- wget https://github.com/xmake-io/xmake/archive/v$version.tar.gz -O $workdir/xmake-$version.tar.gz
+ ./scripts/archive-all
+ cp ./artifacts/xmake.tar.gz $tarball
fi
# extract tarball
cd $workdir
if [ ! -d xmake-$version ]; then
- tar -xvf xmake-$version.tar.gz
+ mkdir xmake-$version
+ tar -xvf xmake-$version.tar.gz -C xmake-$version
fi
# enter project directory
@@ -41,7 +43,7 @@ echo "making template .."
if [ -d debian ]; then
rm -rf debian
fi
-dh_make -e [email protected] -c apache -y -s -f ../xmake-$version.tar.gz
+USER=ruki dh_make -e [email protected] -c apache -y -s -f ../xmake-$version.tar.gz
# copy debian
echo "instaling debian .."