Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Toggle Google/Amazon Android map imports

View mapimports.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/bash
 
A_IMPORT="import com.amazon.geo.maps"
G_IMPORT="import com.google.android.maps"
 
A_VIEW="com.amazon.geo.maps.MapView"
G_VIEW="com.google.android.maps.MapView"
 
if [ "$1" = "a" ]; then
FR=$G_IMPORT
TO=$A_IMPORT
FR1=$G_VIEW
TO1=$A_VIEW
else
FR=$A_IMPORT
TO=$G_IMPORT
FR1=$A_VIEW
TO1=$G_VIEW
fi
 
find ./src -name "*.java" -print | xargs sed -i "" "s/$FR/$TO/g"
find ./res/layout -name "*.xml" -print | xargs sed -i "" "s/$FR1/$TO1/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.