Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Aug 3, 2023
1 parent 4fac296 commit e2c8dd3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions zip-content/inc/common-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,21 @@ is_valid_prop()
return 0 # Valid
}

sys_getprop()
{
local _val

if _val="$(simple_file_getprop "${1:?}" "${TMP_PATH:?}/build.prop")" && is_valid_prop "${_val?}"; then
:
elif _val="$(simple_getprop "${1:?}")" && is_valid_prop "${_val?}"; then
:
else
return 1
fi

printf '%s\n' "${_val:?}"
}

# String related functions
is_substring()
{
Expand Down Expand Up @@ -1766,3 +1781,7 @@ find_test()
{
find "$1" -type d -exec echo 'FOLDER:' '{}' ';' -o -type f -exec echo 'FILE:' '{}' ';' | while read -r x; do echo "${x}"; done
}

### INITIALIZATION ###

initialize
4 changes: 2 additions & 2 deletions zip-content/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ FAKE_SIGN=false

### CODE ###

initialize

INSTALL_FDROIDPRIVEXT="$(parse_setting 'INSTALL_FDROIDPRIVEXT' "${INSTALL_FDROIDPRIVEXT:?}")"
INSTALL_AURORASERVICES="$(parse_setting 'INSTALL_AURORASERVICES' "${INSTALL_AURORASERVICES:?}")"
INSTALL_NEWPIPE="$(parse_setting 'INSTALL_NEWPIPE' "${INSTALL_NEWPIPE:?}")"
Expand Down Expand Up @@ -66,6 +64,8 @@ else
ui_error 'Invalid API level'
fi

#_arch_list=','$(sys_getprop 'ro.product.cpu.abi')','$(sys_getprop 'ro.product.cpu.abi2')','$(sys_getprop 'ro.product.cpu.upgradeabi')','$(sys_getprop 'ro.product.cpu.abilist')','

# shellcheck disable=SC2312
ABI_LIST=','$(build_getprop 'product\.cpu\.abi')','$(build_getprop 'product\.cpu\.abi2')','$(build_getprop 'product\.cpu\.abilist')','
if is_substring ',x86,' "${ABI_LIST}"; then
Expand Down

0 comments on commit e2c8dd3

Please sign in to comment.