From 40b2f320d8cab39b522fe742c56cc83736878858 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Sat, 11 Feb 2017 18:33:37 +0100 Subject: Simplify directory creation and add ADB version output Should be ok as long as all files go into /system/vendor/firmware. Signed-off-by: Wolfgang Wiedmeyer --- firmwares.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/firmwares.sh b/firmwares.sh index fd32950..eb273eb 100755 --- a/firmwares.sh +++ b/firmwares.sh @@ -53,6 +53,8 @@ find_files () { } prepare_adb () { + echo -n "Using " + $ADB version $ADB root sleep 3 $ADB remount @@ -61,15 +63,13 @@ prepare_adb () { push_files () { fw_file=$1 - cat "$DEVICE-fwinfo/$fw_file.txt" | while read file + cat "$DEVICE-fwinfo/$fw_file.txt" | while read file_string do - echo "Pushing ${file#*:}" - - path=$( dirname "${file#*:}" ) - $ADB shell mkdir -p "$path" + file="${file_string#*:}" + echo "Pushing $file" path="$DEVICE-fw/"$( basename $file ) - $ADB push "$path" "${file#*:}" + $ADB push "$path" "$file" done } @@ -151,6 +151,7 @@ case "$ACTION" in *) eval_fw_func find_files prepare_adb + $ADB shell mkdir -p /system/vendor/firmware eval_fw_func push_files ;; esac -- cgit v1.1