Skip to content

Commit

Permalink
Merge pull request #98 from barriosnahuel/develop
Browse files Browse the repository at this point in the history
v2.3.0
  • Loading branch information
barriosnahuel authored Jun 12, 2019
2 parents 99c46ee + 542a832 commit 822494f
Show file tree
Hide file tree
Showing 33 changed files with 331 additions and 299 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ script:
- shellcheck createDirectoriesTree.sh
- shellcheck common.sh
- shellcheck install.sh
- shellcheck modules/sdkman/sdkman.sh
- shellcheck modules/sdkman.sh
- shellcheck modules/android.sh
- shellcheck modules/gimp.sh
- shellcheck modules/git.sh
- shellcheck modules/go.sh
- shellcheck modules/google-drive.sh
- shellcheck modules/heroku.sh
- shellcheck modules/homebrew.sh
- shellcheck modules/java.sh
- shellcheck modules/maven.sh
- shellcheck modules/mixxx.sh
- shellcheck modules/nodejs.sh
- shellcheck modules/oh-my-zsh.sh
- shellcheck modules/oh-my-zsh/oh-my-zsh.sh
- shellcheck modules/ssh.sh
- shellcheck modules/sublime-text.sh
- shellcheck modules/tomcat.sh
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# v2.3.0
## Added
- Finder relaunch automatically.
- Comments in Android related env vars in .bashrc and .zshrc.
- ERROR/WARN/INFO preffix for logs.
- `DEFAULT_USER` environment variable. #74
- GIT remote to the oh-my-zsh info. #80

## Changed
- Order modules by priority at `common.sh`.
- Setup Finder to show hidden files at the beginning in favor of future errors.
- Intellij IDEA and Android Studio download links changed to JetBrains toolbox.
- Minor things in README to make it clearer.
- Google Drive client for OS X now is only suggested via the official download page.
- Tomcat to v9.0.20.
- Install ZSH only when isn't already installed.
- Java installed through sdkman.
- Log files are cleaned on each run.

## Fixed
- GIT properties now are configured ok. #66
- Directories tree now is fully created.
- `tail` command in README as well as logs.
- Fallback when cding because currently it's not exiting right.
- Not going back to EFU's execution directory after installing Android utilities.
- Tomcat installation was breaking the script.
- `java` command execution on OS X without having it installed.
- Missing logs on summary.

## Removed
- Deprecated links and graphics from README.
- Dex2Jar Android utility in favor of user specific needs.
- Go language in favor of user's specific needs.
- Global Gradle properties in favor of per project optimized settings.
- Duplicated logs.

# v2.2.0
## Added
- History changelog to let user view the diff.
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ EFU (Easy-Fast-Upgradable): The SH script you need to finish your Ubuntu/MacOS X
[![stable](https://img.shields.io/badge/stability-stable-green.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index)
[![Build Status](https://travis-ci.org/barriosnahuel/efu.svg?branch=master)](https://travis-ci.org/barriosnahuel/efu)

## Issues: [![Stories ready to be worked on](https://badge.waffle.io/barriosnahuel/efu.png?label=ready&title=Ready)](https://waffle.io/barriosnahuel/efu) [![Stories in progress](https://badge.waffle.io/barriosnahuel/efu.png?label=in progress&title=In Progress)](https://waffle.io/barriosnahuel/efu)


## Use it
1. Download [latest release](https://github.com/barriosnahuel/efu/releases).
2. `cd` into downloaded directory.
3. Edit `properties.sh` with your custom info. Properties are required in order tu setup GIT.
3. Edit `properties.sh` with your custom info.
4. `sh install.sh [osx | ubuntu | lubuntu]`

On OS X, also:
5. In a new tab of your terminal: `tail –f ~/Downloads/efu.log`
6. Once finished, take a look to: `~/Downloads/summary.efu.log`
5. *\[OS X only]* In a new tab of your terminal: `tail ~/Downloads/efu.log –f`
6. *\[OS X only]* In a new tab of your terminal: `tail ~/Downloads/summary.efu.log -f`

So you will have 3 tabs:
- One for the main script: `install.sh`*You should check this tab because it will ask you for some things.*
- One for the main script you're running: `install.sh`*You should check this tab because it will ask you for some things.*
- One for `efu.log` output. ⇐ *Full script output.*
- One for `summary.efu.log` output. ⇐ *Most cases this will be enough.*

Expand All @@ -36,8 +31,6 @@ With a little of your interaction, EFU will:
- [Pidcat](https://github.com/JakeWharton/pidcat)
- Gimp
- GIT
- Go language
- [Google Drive command line client](https://github.com/odeke-em/drive)
- Heroku toolbelt
- Maven
- [Mixxx](http://www.mixxx.org/): DJ software
Expand All @@ -49,6 +42,7 @@ With a little of your interaction, EFU will:
- Homebrew (OS X only)
- Install (and setup) many software (Ubuntu only):
- Common packages to compress and uncompress common files
- Google Drive command line client
- Dropbox
- GParted with NTFS support
- Mega sync client
Expand All @@ -67,4 +61,8 @@ With a little of your interaction, EFU will:

## Contributing

The repo uses [this branching model](http://nvie.com/posts/a-successful-git-branching-model/).
The repo uses [this branching model](http://nvie.com/posts/a-successful-git-branching-model/).

### Testing

Manually running tests from `test.sh` by: `sh test.sh`
11 changes: 6 additions & 5 deletions Ubuntu/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,37 @@ postInstallationLog "Gnome System Tools"
logInfo "Available programs: network-admin, shares-admin, time-admin, users-admin"


log "Installing packages to compress and extract different kind of files..."
logInfo "Installing packages to compress and extract different kind of files..."
sudo apt-get -fy install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract


preInstallationLog "GParted with NTFS support"
sudo apt-get -fy install gparted ntfs-3g


log "Adding repositories for Rhythmbox and its plugins..."
logInfo "Adding repositories for Rhythmbox and its plugins..."
sudo add-apt-repository ppa:fossfreedom/rhythmbox -y
sudo add-apt-repository ppa:fossfreedom/rhythmbox-plugins -y
sudo apt-get update
log "Instaling latest Rhythmbox and its plugins..."
logInfo "Instaling latest Rhythmbox and its plugins..."
sudo apt-get -fy install rhythmbox rhythmbox-plugin-rhythmweb rhythmbox-plugin-equalizer rhythmbox-plugin-opencontainingfolder rhythmbox-plugin-llyrics


preInstallationLog "Subdownloader, GMountISO, Freemind (a mind maps editor), Sound Converter, Steam client (will update on first run) and PlayOnLinux"
sudo apt-get -fy install subdownloader gmountiso freemind soundconverter steam playonlinux
postInstallationLog "Subdownloader, GMountISO, Freemind (a mind maps editor), Sound Converter, Steam client (will update on first run) and PlayOnLinux"


if isUbuntu "$PLATFORM"; then
# shellcheck source=installAll-15.04.sh
. ./installAll-15.04.sh
fi

log "Cleaning up..." &&
logInfo "Cleaning up..." &&
sudo apt-get -f install &&
sudo apt-get autoremove &&
sudo apt-get -y autoclean &&
sudo apt-get -y clean

log "Updating installed packages..."
logInfo "Updating installed packages..."
sudo apt-get upgrade
2 changes: 0 additions & 2 deletions Ubuntu/installAll-14.10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ mv gradle-2.2.1 ~/Coding/xDKs &&
mv gradle-2.2.1-bin.zip ~/Coding/xDKs &&
echo 'export GRADLE_HOME=$HOME/Coding/xDKs/gradle-2.2.1' >> ~/.bashrc &&
echo 'export PATH=$GRADLE_HOME/bin:$PATH' >> ~/.bashrc &&
echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties &&
echo "org.gradle.parallel=true" >> ~/.gradle/gradle.properties &&
echo "==> - EFU: Successfully added Gradle to path environment variable."

echo "==> - EFU: Installing Intellij IDEA Ultimate Edition..." &&
Expand Down
7 changes: 4 additions & 3 deletions Ubuntu/installAll-15.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
# Created by Nahuel Barrios.


cd ~/Downloads/ || (echo "Failed cding into Downloads directory, exiting..." && exit)
enterDirOrExit ~/Downloads
downloadAndInstall "GetDeb" http://archive.getdeb.net/install_deb/getdeb-repository_0.1-1~getdeb1_all.deb
downloadAndInstall "PlayDeb" http://archive.getdeb.net/install_deb/playdeb_0.3-1~getdeb1_all.deb


log "Installing Dropbox, MongoDB and WebP command line tools..."
preInstallationLog "Installing Dropbox, MongoDB and WebP command line tools..."
sudo apt-get -fy install nautilus-dropbox mongodb curl webp
postInstallationLog "Installing Dropbox, MongoDB and WebP command line tools..."


cd ~/Downloads/ || (echo "Failed cding into Downloads directory, exiting..." && exit)
enterDirOrExit ~/Downloads
downloadAndInstall "Mega Sync client" https://mega.nz/linux/MEGAsync/xUbuntu_15.04/amd64/megasync-xUbuntu_15.04_amd64.deb
downloadAndInstall "Mega Nautilus extension" https://mega.nz/linux/MEGAsync/xUbuntu_15.04/amd64/nautilus-megasync-xUbuntu_15.04_amd64.deb
downloadAndInstall "TeamViewer" http://www.teamviewer.com/download/teamviewer_linux.deb
Expand Down
39 changes: 18 additions & 21 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@
if isOsx "$PLATFORM"; then
. modules/homebrew.sh
else
log "Installing gdebi package manager..."
logInfo "Installing gdebi package manager..."
sudo apt-get -fy install gdebi

log "Updating software sources. Required after adding ppa repositories."
logInfo "Updating software sources. Required after adding ppa repositories."
sudo apt-get update

log "Fixing current packages..."
logInfo "Fixing current packages..."
sudo apt-get -f install

log "Removing packages that are not necessary to prevent conflicts..."
logInfo "Removing packages that are not necessary to prevent conflicts..."
sudo apt-get autoremove

log "#### Software repositories and packages updated ok ####"
logSummary "Software repositories and packages updated ok"
fi

if isLubuntu "$PLATFORM"; then
return 0
fi

# Remember that jq.sh requires Homebrew.sh.
# shellcheck source=modules/jq.sh
. modules/jq.sh

# Remember that oh-my-zsh.sh requires Homebrew.sh.
# shellcheck source=modules/oh-my-zsh.sh
. modules/oh-my-zsh.sh

# shellcheck source=modules/git.sh
. modules/git.sh

# shellcheck source=modules/ssh.sh
. modules/ssh.sh

# Remember that oh-my-zsh.sh requires Homebrew.sh.
# shellcheck source=modules/oh-my-zsh.sh
. modules/oh-my-zsh/oh-my-zsh.sh

# Remember that jq.sh requires Homebrew.sh.
# shellcheck source=modules/jq.sh
. modules/jq.sh

# shellcheck source=modules/nodejs.sh
. modules/nodejs.sh

Expand All @@ -52,17 +52,10 @@ fi
# shellcheck source=modules/sublime-text.sh
. modules/sublime-text.sh

# Remember that go.sh requires Homebrew.sh.
# shellcheck source=modules/go.sh
. modules/go.sh

# Remember that nodejs.sh requires go.sh.
# shellcheck source=modules/google-drive.sh
. modules/google-drive.sh

# shellcheck source=modules/java.sh
. modules/java.sh

# shellcheck source=modules/gimp.sh
. modules/gimp.sh

Expand All @@ -78,7 +71,11 @@ fi

# sdkman at the end because SDKMAN_DIR environment variable must be at the end to work.
# shellcheck source=modules/sdkman.sh
. modules/sdkman/sdkman.sh
. modules/sdkman.sh

# Remember that java.sh requires sdkman.sh.
# shellcheck source=modules/java.sh
. modules/java.sh

# Remember that maven.sh requires sdkman.sh.
# shellcheck source=modules/maven.sh
Expand Down
18 changes: 9 additions & 9 deletions createDirectoriesTree.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
# Created by Nahuel Barrios on 15/04/15. Contact me at: [email protected]

log "#### Creating directories tree ####"
logInfo "#### Creating directories tree ####"

cd ~/ &&
mkdir .gradle ||
mkdir Coding ||
mkdir .gradle
mkdir Coding
cd Coding &&
mkdir IDEs ||
mkdir xDKs ||
mkdir servers ||
mkdir tools ||
mkdir workspace-mine ||
mkdir workspace-test ||
mkdir IDEs
mkdir xDKs
mkdir servers
mkdir tools
mkdir workspace-mine
mkdir workspace-test
mkdir workspace-work
44 changes: 29 additions & 15 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,43 @@
# Created by Nahuel Barrios on 15/04/15.
# shellcheck disable=SC1090

log() {
echo "EFU ==> $1 $2 $3" &&
echo "EFU ==> $1 $2 $3" >> ~/Downloads/efu.log
logError () {
echo "ERROR - EFU: $1 $2 $3"
echo "ERROR - EFU: $1 $2 $3" >> ~/Downloads/efu.log
echo "ERROR - EFU: $1 $2 $3" >> ~/Downloads/summary.efu.log
}

logError() {
echo "EFU ==> ERROR: $1 $2 $3" &&
echo "EFU ==> ERROR: $1 $2 $3" >> ~/Downloads/efu.log
logWarn () {
echo "WARN - EFU: $1 $2 $3"
echo "WARN - EFU: $1 $2 $3" >> ~/Downloads/efu.log
echo "WARN - EFU: $1 $2 $3" >> ~/Downloads/summary.efu.log
}

logInfo (){
log "$1 $2 $3"
echo "EFU ==> $1 $2 $3" >> ~/Downloads/summary.efu.log
echo "INFO - EFU: $1 $2 $3"
echo "INFO - EFU: $1 $2 $3" >> ~/Downloads/efu.log
}

logSummary (){
echo "INFO - EFU: $1 $2 $3"
echo "INFO - EFU: $1 $2 $3" >> ~/Downloads/summary.efu.log
}

logAlreadyInstalled (){
log "'$1' already installed. Skipping installation..."
logWarn "'$1' already installed. Skipping installation..."
}

logProgramVersion (){
log "$1 $2 $3"
echo "EFU ==> Installed $1 $2 $3" >> ~/Downloads/summary.efu.log
logInfo "$1" "$2" "$3"
logSummary "Installed $1 $2 $3" >> ~/Downloads/summary.efu.log
}

preInstallationLog(){
log "Installing $1..."
logInfo "Installing $1..."
}

postInstallationLog(){
log "$1 installed ok"
logSummary "$1 installed ok"
}

isUbuntu(){
Expand Down Expand Up @@ -118,7 +125,7 @@ downloadAndUncompress() {
## Parameters:
# 1. File name (without path).
uncompress(){
log "Uncompressing $1"
logInfo "Uncompressing $1"

# Use the file extension to use unzip or tar to uncompress the file.
if [ "$(getFileExtension "$1")" = "zip" ]; then
Expand All @@ -127,7 +134,7 @@ uncompress(){
tar -zxf "$1"
fi

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

addToShell() {
Expand All @@ -152,4 +159,11 @@ getGitHubFirstAssetFromLatestRelease(){
# 1. Url to the browser download url.
downloadAssetFromGitHub(){
curl -LOk "$1"
}

enterDirOrExit(){
if ! cd "$1"; then
echo "Failed cding into $1, exiting..."
exit 1
fi
}
Loading

0 comments on commit 822494f

Please sign in to comment.