6 copy_apks_into_repo() {
7 for f in `ls -1 ../../*/bin/*.apk`; do
8 name=$(basename $(dirname `dirname $f`))
10 apk=`aapt d badging "$f" | sed -n "s,^package: name='\(.*\)' versionCode='\([0-9][0-9]*\)' .*,\1_\2.apk,p"`
16 if [ -z $WORKSPACE ]; then
17 WORKSPACE=`dirname $(pwd)`
18 echo "Setting Workspace to $WORKSPACE"
21 # allow the location of the script to be overridden
22 if [ -z $fdroid ]; then
23 fdroid="$WORKSPACE/fdroid"
26 #------------------------------------------------------------------------------#
27 # setup a new repo from scratch
29 REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
32 copy_apks_into_repo $REPOROOT
37 #------------------------------------------------------------------------------#
38 # setup a new repo from scratch and generate a keystore
40 REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
41 KEYSTORE=$REPOROOT/keystore.jks
43 $fdroid init --keystore $KEYSTORE
45 copy_apks_into_repo $REPOROOT
48 test -e repo/index.xml
49 test -e repo/index.jar
52 #------------------------------------------------------------------------------#
53 # setup a new repo from scratch with a HSM/smartcard
55 REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
57 $fdroid init --keystore NONE
58 test -e opensc-fdroid.cfg