Merge "Fix mistake made when moving installmod from shell function standalone script" into main

This commit is contained in:
Treehugger Robot
2024-07-26 00:15:44 +00:00
committed by Gerrit Code Review

View File

@@ -28,7 +28,6 @@ if [[ $# -eq 0 ]]; then
return 1 return 1
fi fi
local _path
_path=$(outmod ${@:$#:1}) _path=$(outmod ${@:$#:1})
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
return 1 return 1
@@ -39,7 +38,7 @@ if [ -z "$_path" ]; then
echo "Module '$1' does not produce a file ending with .apk (try 'refreshmod' if there have been build changes?)" >&2 echo "Module '$1' does not produce a file ending with .apk (try 'refreshmod' if there have been build changes?)" >&2
return 1 return 1
fi fi
local serial_device="" serial_device=""
if [[ "$1" == "-s" ]]; then if [[ "$1" == "-s" ]]; then
if [[ $# -le 2 ]]; then if [[ $# -le 2 ]]; then
echo "-s requires an argument" >&2 echo "-s requires an argument" >&2
@@ -48,7 +47,7 @@ if [[ "$1" == "-s" ]]; then
serial_device="-s $2" serial_device="-s $2"
shift 2 shift 2
fi fi
local length=$(( $# - 1 )) length=$(( $# - 1 ))
echo adb $serial_device install ${@:1:$length} $_path echo adb $serial_device install ${@:1:$length} $_path
adb $serial_device install ${@:1:$length} $_path adb $serial_device install ${@:1:$length} $_path