Skip to content

Commit

Permalink
Merge pull request #42 from barriosnahuel/develop
Browse files Browse the repository at this point in the history
Release v2.1.0
  • Loading branch information
barriosnahuel committed Apr 16, 2016
2 parents 6b98226 + eef3e7c commit f976dc3
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 6 deletions.
4 changes: 3 additions & 1 deletion OS X/installAll-10.11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@

preInstallationLog "Transmission"
brew install transmission
postInstallationLog "Transmission"
postInstallationLog "Transmission"

logInfo "Download Mac Fans Control from: http://www.crystalidea.com/macs-fan-control"
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ With a little of your interaction, EFU will:
- Create a directories tree under ~/Coding for coders.
- Install (and setup) many software:
- Android
- [ClassyShark](https://github.com/google/android-classyshark/)
- [Dex2Jar](https://github.com/pxb1988/dex2jar)
- [Pidcat](https://github.com/JakeWharton/pidcat)
- Ant
- Gimp
- GIT
Expand Down
1 change: 1 addition & 0 deletions createDirectoriesTree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cd Coding
mkdir IDEs
mkdir xDKs
mkdir servers
mkdir tools
mkdir workspace-mine
mkdir workspace-test
mkdir workspace-work
Expand Down
28 changes: 24 additions & 4 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,22 @@ downloadAndUncompress() {
# Get file name from path or URL.
FILE_NAME=$(getFileName "$2") &&

uncompress "$FILE_NAME"
}

## Parameters:
# 1. File name (without path).
uncompress(){
log "Uncompressing $1"

# Use the file extension to use unzip or tar to uncompress the file.
if [ "$(getFileExtension "$FILE_NAME")" = "zip" ]; then
unzip "$FILE_NAME"
if [ "$(getFileExtension "$1")" = "zip" ]; then
unzip "$1"
else
tar -zxf "$FILE_NAME"
tar -zxf "$1"
fi

echo "$1 uncompressed successfully."
log "$1 uncompressed successfully."
}

addToShell() {
Expand All @@ -131,4 +139,16 @@ addToShell() {
echo "$1" >> ~/.zshrc &&
. ~/.zshrc
fi
}

## Parameters:
# 1. String w/ format: "repoOwner/repoName"
getGitHubFirstAssetFromLatestRelease(){
curl -s https://api.github.com/repos/"$1"/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4
}

## Parameters:
# 1. Url to the browser download url.
downloadAssetFromGitHub(){
curl -LOk "$1"
}
56 changes: 55 additions & 1 deletion modules/android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,58 @@ addToShell 'export PATH=$ANDROID_HOME/platform-tools:$PATH'
# This is to be able to use the hierarchy viewer
addToShell "export ANDROID_HVPROTO=ddm"

log "Successfully added Android environment variables."
log "Successfully added Android environment variables."


preInstallationLog "Android utilities"

preInstallationLog "Dex 2 Jar"
# https://github.com/pxb1988/dex2jar

cd ~/Coding/tools/
DEX2JAR_DOWNLOAD_URL=$(getGitHubFirstAssetFromLatestRelease "pxb1988/dex2jar")

# Get file name from url.
FILE_NAME=$(getFileName "$DEX2JAR_DOWNLOAD_URL") &&

downloadAssetFromGitHub "$DEX2JAR_DOWNLOAD_URL"
uncompress "$FILE_NAME"

DEX2JAR_DIRECTORY="dex2jar-$(getFileName "$(dirname "$DEX2JAR_DOWNLOAD_URL")")"
cd "$DEX2JAR_DIRECTORY"
chmod +x ./*
addToShell "alias d2j='~/Coding/tools/$DEX2JAR_DIRECTORY/d2j-dex2jar.sh'"

echo "Usage: d2j-dex2jar.sh -f path/to/your-apk.apk" >> USAGE.txt
echo "More info at: https://github.com/pxb1988/dex2jar" >> USAGE.txt
logInfo "[Android Utilities]: 'd2j' alias created."
postInstallationLog "Dex 2 Jar"


preInstallationLog "ClassyShark"
# https://github.com/google/android-classyshark/

cd ~/Coding/tools/
mkdir classyshark
cd classyshark
downloadAssetFromGitHub "$(getGitHubFirstAssetFromLatestRelease "google/android-classyshark")"
addToShell "alias classyshark='java -jar ~/Coding/tools/classyshark/ClassyShark.jar &'"
logInfo "[Android Utilities]: 'classyshark' alias created."
postInstallationLog "ClassyShark"


preInstallationLog "Pidcat Android Logcat decorator"
# https://github.com/JakeWharton/pidcat

if [ "$(isUbuntu "$PLATFORM")" ]; then
cd ~/Coding/tools/
curl -H "Accept: application/vnd.github.v3.raw" \
-LO https://api.github.com/repos/JakeWharton/pidcat/contents/pidcat.py
addToShell "alias pidcat='python ~/Coding/tools/pidcat.py'"
else
brew install pidcat
fi
logInfo "[Android Utilities]: run 'pidcat your.application.package' to see an improved logcat. More info at https://github.com/JakeWharton/pidcat"
postInstallationLog "Pidcat Android Logcat decorator"

postInstallationLog "Android utilities"

0 comments on commit f976dc3

Please sign in to comment.