diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-10-23 13:14:21 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-10-23 13:14:21 -0200 |
commit | aa8a7a84792bf89b571065bb7a9581a785f00702 (patch) | |
tree | f2915d914810b48ebc7a474536cffdba2cf06c06 | |
parent | dfaa5f76d8a29679da9f14d7bf3078ce2ac6046b (diff) | |
download | scripts-aa8a7a84792bf89b571065bb7a9581a785f00702.tar.gz scripts-aa8a7a84792bf89b571065bb7a9581a785f00702.tar.bz2 |
Adds android-push android-pull
l--------- | android-pull | 1 | ||||
-rwxr-xr-x | android-push | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/android-pull b/android-pull new file mode 120000 index 0000000..4bac549 --- /dev/null +++ b/android-pull @@ -0,0 +1 @@ +android-push
\ No newline at end of file diff --git a/android-push b/android-push new file mode 100755 index 0000000..f3d12cb --- /dev/null +++ b/android-push @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Push and pull to android device. +# + +# Parameters +BASENAME="`basename $0`" +ORIG="$1" +DEST="$2" +ANDROID_BASE="${3:-/storage/emulated/0}" + +# Check +if [ -z "$DEST" ]; then + echo "Usage: $BASENAME <orig> <dest> [android-base]" + echo "" + echo "Examples" + echo "" + echo "android-push /mylocal/music/ Music/" + echo "androis-pull Music /mylocal/music" + echo "androis-pull Ringtones /mylocal/ringtones $ANDROID_BASE" + exit 1 +fi + +# Run +if [ "$BASENAME" == "android-pull" ]; then + adb pull $ANDROID_BASE/$ORIG $DEST +else + adb push $ORIG $ANDROID_BASE/$DEST +fi |