mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
remove hard-coded assumption about apk name
So can use the thing to sign-and-install local fdroid builds
This commit is contained in:
parent
837ff1f8fc
commit
0754e0db8e
1 changed files with 10 additions and 6 deletions
|
@ -28,14 +28,18 @@ done
|
|||
[ -z "$APKS" ] && usage "no apks provided"
|
||||
|
||||
for APK in $APKS; do
|
||||
if [ ${APK/-unsigned} == $APK ]; then
|
||||
echo "$APK not unsigned; skipping"
|
||||
continue
|
||||
fi
|
||||
APK_SIGNED=/tmp/$$_tmp.apk
|
||||
cp $APK $APK_SIGNED
|
||||
|
||||
jarsigner -verbose -digestalg SHA1 -keystore ~/.keystore $APK_SIGNED mykey
|
||||
rm -f ${APK/-unsigned/-signed}
|
||||
zipalign -v 4 $APK_SIGNED ${APK/-unsigned/-signed}
|
||||
if [ ${APK/-unsigned} == $APK ]; then
|
||||
OUTNAME=${APK/.apk/.signed.apk}
|
||||
else
|
||||
OUTNAME=${APK/-unsigned/-signed}
|
||||
fi
|
||||
rm -f ${OUTNAME}
|
||||
zipalign -v 4 $APK_SIGNED ${OUTNAME}
|
||||
|
||||
rm -f $APK_SIGNED
|
||||
echo "saved as $OUTNAME"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue