-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/tchap_v1.99.5'
- Loading branch information
Showing
67 changed files
with
281 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if [ "$#" -ne 2 ] | ||
then | ||
echo "Usage: ./sign_all_apks \$KEY \$FOLDER" | ||
exit 1 | ||
fi | ||
|
||
# Get the command line parameters | ||
PARAM_KEYSTORE_PATH=$1 | ||
PARAM_DIRECTORY=$2 | ||
CHECKSUM_FILE="checksum.txt" | ||
|
||
apkFiles=$(ls "$PARAM_DIRECTORY"/*.apk) | ||
if [ "${#apkFiles[@]}" -eq 0 ] | ||
then | ||
echo "The directory doesn't contain apk files." | ||
exit 1 | ||
fi | ||
|
||
# Sign all the apks in the directory PARAM_DIRECTORY | ||
for file in ${PARAM_DIRECTORY}/*.apk | ||
do | ||
echo "Signing.... ${file}" | ||
sh ./sign_apk.sh "${PARAM_KEYSTORE_PATH}" "${file}" | ||
done | ||
|
||
# Rename and Hash all the apks in the directory PARAM_DIRECTORY | ||
for file in ${PARAM_DIRECTORY}/*.apk | ||
do | ||
# Rename Apk: remove unsigned by signed | ||
apkName="$(echo ${file} | sed -e 's/\-unsigned/-signed/')" ; | ||
mv "${file}" "${apkName}" ; | ||
|
||
# Hash application with SHA 256 | ||
echo "Hash SHA 256 on file... ${apkName}" | ||
result="$(shasum "-a" "256" ${apkName})" | ||
|
||
# Save hash in file: Checksum.txt | ||
resultSplit=(${result}) | ||
newName="$(echo ${resultSplit[1]} | sed 's/.*\///')" | ||
echo "SHA256(${newName})=${resultSplit[0]}" > ${PARAM_DIRECTORY}/${CHECKSUM_FILE} | ||
done | ||
|
||
echo "done !! :)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.