build-package report: add entries for user/installer utilities

merge-requests/23/head
Christopher Roy Bratusek 5 years ago
parent 4d0fc192b7
commit f758ebf2da

@ -134,6 +134,7 @@ for apks downloaded from F-Droid repositories or from APK Mirror, `build-package
The `build-package` script additionally supports the following parameters:
* `check` check if all files were properly downloaded
* `report` create a package report **work-in-progress**
* `clean` remove any untracked files from the repo (e. g. from `build-package pull`)
* `dalvik [.jar]` prepare a jar file for use with DalvikVM (requires Android SDK)
* `ver [version] [date]` change project version

@ -13,7 +13,9 @@ create_report () {
for file in $(find ${CWD} -type f); do
case ${file} in
*.apk.gz ) get_apk_info ${file} ;;
*.so* ) get_swipe_info ${file} ;;
*.so* ) get_swipe_info ${file} ;;
*xbin* ) get_bin_info ${file} ;;
*tools* ) get_bin_info ${file} ;;
esac
done
@ -101,3 +103,29 @@ get_swipe_info () {
" >> ${REPORT_FILE}
}
get_bin_info () {
BIN_FILE=$(basename ${1})
BIN_NAME=$(basename ${1} | sed -e 's/\.*//')
BIN_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
case ${BIN_PATH} in
*xbin* ) BIN_TYPE="Android User Utility" ;;
*tools*) BIN_TYPE="Android Installer Utility" ;;
esac
BIN_ARCH=$(file -b ${1} | gawk -F, '{print $2 " [ " $1 " ] [" $3 " ]"}')
BIN_SPECS=$(file -b ${1} | gawk -F, '{print $4 " [" $7 " ] [" $6 " ]"}')
BIN_SHA=$(sha256sum ${1} | gawk '{print $1}')
echo "${BIN_TYPE}: ${BIN_NAME}
| Filename: ${BIN_FILE}
| Origin: ${BIN_PATH}
| Arch: ${BIN_ARCH}
| Specifics: ${BIN_SPECS}
| SHA256: ${BIN_SHA}
" >> ${REPORT_FILE}
}

Loading…
Cancel
Save