mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
Some minor corrections (shellcheck)
This commit is contained in:
parent
64f322b7db
commit
52868d5ad1
@ -53,8 +53,8 @@ EOF
|
||||
}
|
||||
|
||||
ui_print () {
|
||||
echo -n -e "ui_print ${1}\n" >> /proc/self/fd/${OUTFD}
|
||||
echo -n -e "ui_print\n" >> /proc/self/fd/${OUTFD}
|
||||
echo -e "ui_print ${1}" >> /proc/self/fd/${OUTFD}
|
||||
echo -e "ui_print" >> /proc/self/fd/${OUTFD}
|
||||
}
|
||||
|
||||
detect_outfd () {
|
||||
|
@ -77,8 +77,8 @@ print_info () {
|
||||
echo "${@}"
|
||||
decho "${@}"
|
||||
else
|
||||
echo -n -e "ui_print ${@}\n" >> /proc/self/fd/${OUTFD}
|
||||
echo -n -e "ui_print\n" >> /proc/self/fd/${OUTFD}
|
||||
echo -e "ui_print ${@}" >> /proc/self/fd/${OUTFD}
|
||||
echo -e "ui_print" >> /proc/self/fd/${OUTFD}
|
||||
fi
|
||||
}
|
||||
|
||||
@ -234,13 +234,13 @@ toupper() {
|
||||
}
|
||||
|
||||
find_block () {
|
||||
local block tmp partname devname device
|
||||
local block partname devname device
|
||||
|
||||
block=${1}${SLOT}
|
||||
device=$(find /dev/block \( -type b -o -type c -o -type l \) -name ${block} | head -n 1)
|
||||
|
||||
if [ ! -z ${device} ]; then
|
||||
readlink -f ${device}
|
||||
if [ -n "$device" ]; then
|
||||
readlink -f "$device"
|
||||
return 0
|
||||
fi
|
||||
|
||||
@ -254,8 +254,8 @@ find_block () {
|
||||
done
|
||||
|
||||
device=$(find /dev \( -type b -o -type c -o -type l \) -maxdepth 1 -iname ${block} | head -n 1)
|
||||
if [ ! -z ${device} ]; then
|
||||
readlink -f ${device}
|
||||
if [ -n "$device" ]; then
|
||||
readlink -f "$device"
|
||||
return 0
|
||||
fi
|
||||
|
||||
@ -1505,8 +1505,8 @@ install_addond () {
|
||||
|
||||
installinfo_add () {
|
||||
if [ "${MODE}" = "SYSTEM" ]; then
|
||||
for file in ${@}; do
|
||||
echo ${file} >> ${NANODROID_LIST}
|
||||
for file in "${@}"; do
|
||||
echo "${file}" >> ${NANODROID_LIST}
|
||||
done
|
||||
fi
|
||||
}
|
||||
@ -1530,7 +1530,7 @@ nanodroid_install_file () {
|
||||
[ -z "${source}" ] && error "file: ${file} not found"
|
||||
|
||||
# strip off .${BIN_ARCH} from final filename (if any)
|
||||
xfile=$(basename ${file} .${BIN_ARCH})
|
||||
xfile=$(basename "${file}" .${BIN_ARCH})
|
||||
|
||||
decho " installing file: ${xfile}"
|
||||
|
||||
@ -1627,7 +1627,7 @@ nanodroid_install_apk () {
|
||||
|
||||
nanodroid_install_lib "${dest}/${dest_apk}" "${2}"
|
||||
|
||||
[ "${dir}" == "system/priv-app" ] && create_privapp_permissions_whitelist ${app}
|
||||
[ "${dir}" = "system/priv-app" ] && create_privapp_permissions_whitelist "$app"
|
||||
|
||||
set_perm_data -r "${dest}"
|
||||
}
|
||||
@ -1638,7 +1638,7 @@ nanodroid_install_apk () {
|
||||
|
||||
nanodroid_install_lib () {
|
||||
apk="${1}"
|
||||
dest="$(dirname ${1})"
|
||||
dest="$(dirname "$1")"
|
||||
multilib="${2}"
|
||||
|
||||
unset libd
|
||||
|
@ -47,7 +47,7 @@ done
|
||||
|
||||
[[ -z ${1} ]] && show_help
|
||||
|
||||
for opt in ${@}; do
|
||||
for opt in "$@"; do
|
||||
case ${opt} in
|
||||
full)
|
||||
check_nanodroid || error "run 'build-package pull' first!"
|
||||
|
@ -12,8 +12,8 @@ detect_bootmode () {
|
||||
}
|
||||
|
||||
ui_print() {
|
||||
echo -n -e "ui_print $1\n" >> /proc/self/fd/$OUTFD
|
||||
echo -n -e "ui_print\n" >> /proc/self/fd/$OUTFD
|
||||
echo -e "ui_print $1" >> /proc/self/fd/$OUTFD
|
||||
echo -e "ui_print" >> /proc/self/fd/$OUTFD
|
||||
}
|
||||
|
||||
grep_prop() {
|
||||
@ -102,13 +102,13 @@ toupper() {
|
||||
}
|
||||
|
||||
find_block () {
|
||||
local block tmp partname devname device
|
||||
local block partname devname device
|
||||
|
||||
block=${1}${SLOT}
|
||||
device=$(find /dev/block \( -type b -o -type c -o -type l \) -name ${block} | head -n 1)
|
||||
|
||||
if [ ! -z ${device} ]; then
|
||||
readlink -f ${device}
|
||||
if [ -n "$device" ]; then
|
||||
readlink -f "$device"
|
||||
return 0
|
||||
fi
|
||||
|
||||
@ -122,8 +122,8 @@ find_block () {
|
||||
done
|
||||
|
||||
device=$(find /dev \( -type b -o -type c -o -type l \) -maxdepth 1 -iname ${block} | head -n 1)
|
||||
if [ ! -z ${device} ]; then
|
||||
readlink -f ${device}
|
||||
if [ -n "$device" ]; then
|
||||
readlink -f "$device"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user