Skip to content

Instantly share code, notes, and snippets.

@pgmot
Created December 3, 2015 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pgmot/09b1147cd1844e68c4d0 to your computer and use it in GitHub Desktop.
Save pgmot/09b1147cd1844e68c4d0 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <aar_file> [<output_path>]" 1>&2
exit 1
fi
unzip $1 -d /tmp/aar2jar > /dev/null
if [ -z "$2" ]; then
dir=.
else
dir=$2
fi
mv /tmp/aar2jar/classes.jar $dir/`basename $1 .aar`.jar
rm -rf /tmp/aar2jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment