summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-11 18:33:37 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-11 18:33:37 +0100
commit40b2f320d8cab39b522fe742c56cc83736878858 (patch)
treed0a0ebe02e6bb6009bbb02b43809934c2e388b98
parent1bf50f1123c31f30fc1182dbb9f2006505280f64 (diff)
downloadfirmwares_nonfree-40b2f320d8cab39b522fe742c56cc83736878858.zip
firmwares_nonfree-40b2f320d8cab39b522fe742c56cc83736878858.tar.gz
firmwares_nonfree-40b2f320d8cab39b522fe742c56cc83736878858.tar.bz2
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 <wolfgit@wiedmeyer.de>
-rwxr-xr-xfirmwares.sh13
1 files 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