mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
run-tests: find current version of aapt in folder rather than in PATH
Not everyone adds the build-tools to their PATH, so this makes it so this script will find aapt in the most recent build-tools version that is installed on the local system.
This commit is contained in:
parent
1fcf81b1f4
commit
35ea01cbd6
1 changed files with 12 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ copy_apks_into_repo() {
|
||||||
set +x
|
set +x
|
||||||
for f in `find $APKDIR -name '*.apk' | grep -F -v -e unaligned -e unsigned`; do
|
for f in `find $APKDIR -name '*.apk' | grep -F -v -e unaligned -e unsigned`; do
|
||||||
name=$(basename $(dirname `dirname $f`))
|
name=$(basename $(dirname `dirname $f`))
|
||||||
apk=`aapt dump badging "$f" | sed -n "s,^package: name='\(.*\)' versionCode='\([0-9][0-9]*\)' .*,\1_\2.apk,p"`
|
apk=`$aapt dump badging "$f" | sed -n "s,^package: name='\(.*\)' versionCode='\([0-9][0-9]*\)' .*,\1_\2.apk,p"`
|
||||||
test $f -nt repo/$apk && rm -f repo/$apk # delete existing if $f is newer
|
test $f -nt repo/$apk && rm -f repo/$apk # delete existing if $f is newer
|
||||||
if [ ! -e repo/$apk ] && [ ! -e archive/$apk ]; then
|
if [ ! -e repo/$apk ] && [ ! -e archive/$apk ]; then
|
||||||
echo "$f --> repo/$apk"
|
echo "$f --> repo/$apk"
|
||||||
|
|
@ -47,6 +47,12 @@ if [ $# -ne 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $ANDROID_HOME ]; then
|
||||||
|
echo "ANDROID_HOME must be set with the path to the Android SDK, i.e.: "
|
||||||
|
echo " export ANDROID_HOME=/opt/android-sdk"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
APKDIR=$1
|
APKDIR=$1
|
||||||
|
|
||||||
if [ -z $WORKSPACE ]; then
|
if [ -z $WORKSPACE ]; then
|
||||||
|
|
@ -59,6 +65,11 @@ if [ -z $fdroid ]; then
|
||||||
fdroid="$WORKSPACE/fdroid"
|
fdroid="$WORKSPACE/fdroid"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# allow the location of aapt to be overridden
|
||||||
|
if [ -z $aapt ]; then
|
||||||
|
aapt=`ls -1 $ANDROID_HOME/build-tools/*/aapt | sort | tail -1`
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
echo_header "setup a new repo from scratch using ANDROID_HOME"
|
echo_header "setup a new repo from scratch using ANDROID_HOME"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue