Skip to content

Commit fb04275

Browse files
committed
revert: "chore: minor changes"
Refs: e3afe93.
1 parent e3afe93 commit fb04275

6 files changed

Lines changed: 23 additions & 41 deletions

File tree

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"fileLocation": "search",
2626
"pattern": [
2727
{
28-
"regexp": "^([^:]+):(\\d+):\\s+(ERROR|WARNING):\\s+\\[([^\\]]*)\\]\\s+(.*)\\r?$",
28+
"regexp": "^([^:]+):(\\d+):\\s+(ERROR|WARNING):\\s+\\[([^\\]]*)\\]\\s+(.*)$",
2929
"file": 1,
3030
"line": 2,
3131
"severity": 3,
@@ -55,7 +55,7 @@
5555
"fileLocation": "search",
5656
"pattern": [
5757
{
58-
"regexp": "^([^:]+):(\\d+):\\s+(ERROR|WARNING):\\s+\\[([^\\]]*)\\]\\s+(.*)\\r?$",
58+
"regexp": "^([^:]+):(\\d+):\\s+(ERROR|WARNING):\\s+\\[([^\\]]*)\\]\\s+(.*)$",
5959
"file": 1,
6060
"line": 2,
6161
"severity": 3,

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ if test -n "${ZIP_SHORT_COMMIT_ID?}"; then
130130
fi
131131

132132
if test "${OPENSOURCE_ONLY:?}" != 'false'; then
133-
if ! conf_is_oss_only_build_enabled; then
133+
if ! is_oss_only_build_enabled; then
134134
echo 'WARNING: The OSS only build is disabled'
135135
set_title 'OSS only build is disabled'
136136

@@ -222,15 +222,15 @@ FILENAME_EXT='.zip'
222222
# Download and verify external application files to ensure package integrity; bundled files will be verified at a later stage
223223
{
224224
if test "${OPENSOURCE_ONLY:?}" = 'false'; then
225-
current_dl_list="$(conf_full_files_to_download)" || ui_error 'Missing download list' "${LINENO-}" "${FUNCNAME-}"
225+
current_dl_list="$(files_to_download)" || ui_error 'Missing download list' "${LINENO-}" "${FUNCNAME-}"
226226
dl_list "${current_dl_list?}" || ui_error 'Failed to download the necessary files' "${LINENO-}" "${FUNCNAME-}"
227227

228228
dl_file 'misc/keycheck' 'keycheck-arm.bin' '2e348074961b78c2cf9e8728910ce7c9596f195a6344ead35e536ccebe18df76' 'github.com/someone755/kerneller/raw/9bb15ca2e73e8b81e412d595b52a176bdeb7c70a/extract/tools/keycheck' ''
229229
else
230230
echo 'Skipped not OSS files!'
231231
fi
232232

233-
current_dl_list="$(conf_oss_files_to_download)" || ui_error 'Missing download list' "${LINENO-}" "${FUNCNAME-}"
233+
current_dl_list="$(oss_files_to_download)" || ui_error 'Missing download list' "${LINENO-}" "${FUNCNAME-}"
234234
dl_list "${current_dl_list?}" || ui_error 'Failed to download the necessary files' "${LINENO-}" "${FUNCNAME-}"
235235

236236
clear_dl_temp_dir || ui_error 'Failed to remove the DL temp dir' "${LINENO-}" "${FUNCNAME-}"
@@ -277,7 +277,7 @@ if test -e "${TEMP_DIR:?}/zip-content/origin/file-list.dat"; then
277277
fi
278278

279279
if test "${OPENSOURCE_ONLY:?}" = 'false'; then
280-
conf_full_files_to_download | while IFS='|' read -r LOCAL_FILENAME LOCAL_PATH MIN_API MAX_API FINAL_FILENAME INTERNAL_NAME FILE_HASH _; do
280+
files_to_download | while IFS='|' read -r LOCAL_FILENAME LOCAL_PATH MIN_API MAX_API FINAL_FILENAME INTERNAL_NAME FILE_HASH _; do
281281
mkdir -p -- "${TEMP_DIR:?}/zip-content/origin/${LOCAL_PATH:?}"
282282
cp -f -- "${BUILD_CACHE_DIR:?}/${LOCAL_PATH:?}/${LOCAL_FILENAME:?}.apk" "${TEMP_DIR:?}/zip-content/origin/${LOCAL_PATH:?}/" || ui_error "Failed to copy to the temp dir the file => '${LOCAL_PATH}/${LOCAL_FILENAME}.apk'" "${LINENO-}" "${FUNCNAME-}"
283283

conf/common.inc.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22
# SPDX-FileCopyrightText: NONE
33
# SPDX-License-Identifier: CC0-1.0
44

5-
conf_is_oss_only_build_enabled()
5+
is_oss_only_build_enabled()
66
{ # 0 => true, 1 => false
7-
return 0
7+
return 1
88
}
99

10-
conf_oss_files_to_download()
10+
oss_files_to_download()
1111
{
1212
cat << 'EOF'
1313
EOF

conf/full.inc.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22
# SPDX-FileCopyrightText: NONE
33
# SPDX-License-Identifier: CC0-1.0
44

5-
conf_full_files_to_download()
5+
files_to_download()
66
{
77
cat << 'EOF'
8-
AndroidAuto|priv-app|23||AndroidAuto|com.google.android.projection.gearhead|9fc3e5646210f94ae8a0df299a272dcef1f0e890ceabfc80b3da455e4bffda46|www.apkmirror.com/apk/google-inc/android-auto/android-auto-1-2-520120-stub-release/android-auto-1-2-520120-stub-android-apk-download/|store-eu-par-2.gofile.io/download/web/cdd63095-af4c-4ded-a702-2ae5bc134366/AndroidAuto.apk
9-
Gmail|app|21|25|PrebuiltGmail|com.google.android.gm|b0d3ecad43ad0d3508244fa98914d67b8936eec7dda2aa66cd8a8b5c9f399d08|www.apkmirror.com/apk/google-inc/gmail/gmail-2020-05-31-316831277-release-release/gmail-2020-05-31-316831277-release-3-android-apk-download/|store-eu-par-2.gofile.io/download/web/8b535054-69b1-4f40-9f06-967004ad22a7/Gmail.apk
10-
PlayStore|priv-app|21||Phonesky|com.android.vending|207575ba3c00abf72489a77da05072466aba5255f3a96450a283eefbd379384b|www.apkmirror.com/apk/google-inc/google-play-store/google-play-store-23-0-21-release/google-play-store-23-0-21-21-0-pr-344908203-android-apk-download/|cold5.gofile.io/download/web/9ca20c9a-6f2c-4f88-aa12-a19030a21802/PlayStore.apk
11-
PlayStore7|priv-app|14|20|Phonesky|com.android.vending|8f0a46a22b20e838c9a8d016e6e3d9b09eae0eebd7b41d3bc05d92c6a5e93dfb|www.apkmirror.com/apk/google-inc/google-play-store/google-play-store-7-1-25-release/google-play-store-7-1-25-i-all-0-pr-137772785-android-apk-download/|cold5.gofile.io/download/web/c37fc5ef-00ad-4006-a554-6056401b6fc4/PlayStore7.apk
12-
PlayStoreLegacy|priv-app|9|13|Phonesky|com.android.vending|6c655393625636232af006175495cd45c5b747946576c0c6d0c9069c13372d08|www.apkmirror.com/apk/google-inc/google-play-store/google-play-store-5-1-11-3-release/google-play-store-5-1-11-android-apk-download/|store-eu-par-2.gofile.io/download/web/ea40816c-3bf5-4036-a1e8-975075d7c3a8/PlayStoreLegacy.apk
8+
GoogleContactsSyncAdapter12|priv-app|31||GoogleContactsSyncAdapter|com.google.android.syncadapters.contacts|b680052da895d9a198b856162148de78bc5ad550e46d92239ee9c9308c86ee04|www.apkmirror.com/apk/google-inc/google-contacts-sync/google-contacts-sync-12-8361351-release/google-contacts-sync-12-8361351-android-apk-download/|cold1.gofile.io/download/web/e9cee2f5-0c8c-4fe1-9d5a-3cf13ab395f7/GoogleContactsSyncAdapter12.apk
9+
GoogleContactsSyncAdapter8|priv-app|24|30|GoogleContactsSyncAdapter|com.google.android.syncadapters.contacts|6546c935951a23de8e908a3119dd30d3971b3cbefcbb48d7164688296a5222f5|www.apkmirror.com/apk/google-inc/google-contacts-sync/google-contacts-sync-8-1-0-release/google-contacts-sync-8-1-0-2-android-apk-download/|gitlab.opengapps.org/opengapps/all/-/raw/b458223777512c97639cb6bb54bfad93047406d7/app/com.google.android.syncadapters.contacts/27/nodpi/27.apk
10+
GoogleContactsSyncAdapter4.4|app|19|20|GoogleContactsSyncAdapter|com.google.android.syncadapters.contacts|b952140edbcd847e5349cf42e336f95d7f8f83266470a95c5375c68f06011432|www.apkmirror.com/apk/google-inc/google-contacts-sync/google-contacts-sync-4-4-4-1227136-release/google-contacts-sync-4-4-4-1227136-android-apk-download/|gitlab.opengapps.org/opengapps/all/-/raw/b458223777512c97639cb6bb54bfad93047406d7/app/com.google.android.syncadapters.contacts/19/nodpi/19.apk
11+
GoogleCalendarSyncAdapter6|app|24||GoogleCalendarSyncAdapter|com.google.android.syncadapters.calendar|8bc31441b4c64fe54dffdc3768a8137918db272811f3a27982d41024ef7432b9|www.apkmirror.com/apk/google-inc/google-calendar-sync/google-calendar-sync-6-0-44-267540251-release-release/google-calendar-sync-6-0-44-267540251-release-android-apk-download/|gitlab.opengapps.org/opengapps/all/-/raw/b458223777512c97639cb6bb54bfad93047406d7/app/com.google.android.syncadapters.calendar/21/nodpi/2016267990.apk
12+
GoogleCalendarSyncAdapter5|app|15|22|GoogleCalendarSyncAdapter|com.google.android.syncadapters.calendar|ce3a2ab097db6ef4883eab4bd6f14c78902c3594f8858f121c6de1b82d02d56a|www.apkmirror.com/apk/google-inc/google-calendar-sync/google-calendar-sync-5-2-3-99827563-release-release/google-calendar-sync-5-2-3-99827563-release-2-android-apk-download/|gitlab.opengapps.org/opengapps/all/-/raw/b458223777512c97639cb6bb54bfad93047406d7/app/com.google.android.syncadapters.calendar/15/nodpi/2015080710.apk
13+
GoogleBackupTransport4.4|priv-app|19|20|GoogleBackupTransport|com.google.android.backuptransport|227185c47ab6566535e4541f9f66bb1bf422f608edd6a332316900b59abd74d4|www.apkmirror.com/apk/google-inc/google-backup-transport/google-backup-transport-4-4-4-1227136-release/google-backup-transport-4-4-4-1227136-android-apk-download/|gitlab.opengapps.org/opengapps/all/-/raw/b458223777512c97639cb6bb54bfad93047406d7/priv-app/com.google.android.backuptransport/19/nodpi/19.apk
1314
EOF
1415
}

conf/lfs.inc.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22
# SPDX-FileCopyrightText: NONE
33
# SPDX-License-Identifier: CC0-1.0
44

5-
conf_lfs_get_mirror_by_sha256()
5+
get_mirror_by_sha256()
66
{
77
case "${1?}" in
8-
'32eb051bee23caeff9dff9ea2f0c2e2de5dbc260daea7e9496a9cd1d7dd7ad77')
9-
printf '%s\n' 'github.com/microg/GmsCore/releases/download/v0.3.13.250932/com.google.android.gms-250932026.apk'
10-
;;
11-
*)
12-
ui_nl
13-
# shellcheck disable=SC3028 # Ignore: In POSIX sh, FUNCNAME is undefined
14-
ui_error "Unknown hash => ${1?}" "${LINENO-}" "${FUNCNAME-}"
15-
;;
8+
*) ui_error "Unknown hash => ${1?}" ;;
169
esac
1710

1811
return 0

lib/common.lib.sh

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,7 @@ beep()
7171
# @see restore_saved_title_if_exist()
7272
ui_error()
7373
{
74-
local _source_file
75-
case "${3-}" in
76-
conf_lfs_*) _source_file='lfs.inc.sh' ;;
77-
conf_full_*) _source_file='full.inc.sh' ;;
78-
conf_*) _source_file='common.inc.sh' ;;
79-
*) _source_file="${4:-"${0##*/}"}" ;;
80-
esac
81-
printf 1>&2 '%s:%s: ERROR: [%s] %s\n' "${_source_file?}" "${2:-0}" "${3:-<main>}" "${1:?}"
74+
printf 1>&2 '%s:%s: ERROR: [%s] %s\n' "${4:-"${0##*/}"}" "${2:-0}" "${3:-<main>}" "${1:?}"
8275

8376
pause_if_needed 0
8477
restore_saved_title_if_exist
@@ -105,11 +98,6 @@ ui_debug()
10598
printf 1>&2 '%s\n' "${1?}"
10699
}
107100

108-
ui_nl()
109-
{
110-
printf 1>&2 '\n'
111-
}
112-
113101
export DL_DEBUG="${DL_DEBUG:-false}"
114102
export http_proxy="${http_proxy-}"
115103
export ftp_proxy="${ftp_proxy-}"
@@ -980,8 +968,8 @@ download_cached_if_lfs_pointer()
980968
local _expected_sha256 _mirror_url
981969

982970
# shellcheck source=/dev/null
983-
command 1> /dev/null -v 'conf_lfs_get_mirror_by_sha256' || command . "${MAIN_DIR:?}/conf/lfs.inc.sh" || _ui_error_local "Failed to source 'conf/lfs.inc.sh'" "${LINENO-}" "${FUNCNAME-}"
984-
_mirror_url="$(conf_lfs_get_mirror_by_sha256 "${3:?}")" || _ui_error_local "Failed to get the mirror" "${LINENO-}" "${FUNCNAME-}"
971+
command 1> /dev/null -v 'get_mirror_by_sha256' || command . "${MAIN_DIR:?}/conf/lfs.inc.sh" || _ui_error_local "Failed to source 'conf/lfs.inc.sh'" "${LINENO-}" "${FUNCNAME-}"
972+
_mirror_url="$(get_mirror_by_sha256 "${3:?}")" || _ui_error_local "Failed to get the mirror" "${LINENO-}" "${FUNCNAME-}"
985973

986974
_expected_sha256=$(grep -m 1 -e '^oid sha256:' -- "${2:?}/${1:?}" | cut -d ':' -f 2 -s) || _ui_error_local "Failed to extract the SHA256 hash from the LFS pointer" "${LINENO-}" "${FUNCNAME-}"
987975
dl_file 'LFS' "${_expected_sha256:?}" "${3:?}" "${_mirror_url:?}" ''

0 commit comments

Comments
 (0)