Skip to content

Commit 314dcc6

Browse files
committed
get_apk: Make stripping of whitespace work in Mac OS X
1 parent 400a1e3 commit 314dcc6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

android/get_apk.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ else
1919
esac
2020

2121
for package in $(echo "$packages" | grep $1); do
22-
path=$(adb shell pm path $package | cut -d : -f 2)
22+
# Strip whitespace.
23+
package=$(echo "$package" | tr -d "[[:space:]]")
2324

24-
# Strip trailing whitespace.
25-
path=$(echo $path)
25+
path=$(adb shell pm path $package | cut -d : -f 2)
26+
path=$(echo "$path" | tr -d "[[:space:]]")
2627

28+
echo "Pulling package $package from $path..."
2729
adb pull $prefix$path $package.apk
2830
done
2931
fi

0 commit comments

Comments
 (0)