Skip to content

Commit

Permalink
add in osx atom, sublime, franz, jq and python workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rtancman committed Jan 20, 2018
1 parent 516779a commit 3762aee
Show file tree
Hide file tree
Showing 12 changed files with 246 additions and 94 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
# dotfiles
My dotfiles using shell script inspired by https://github.com/lipemorais/dotfiles

### Run
### Run MacOSX
```bash
$ bash main.sh -u YOUR_LOCAL_USER
```

### Run linux
```bash
$ sudo bash main.sh -u YOUR_LOCAL_USER
```
12 changes: 6 additions & 6 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ echo -e " Y88888 Y88P Y888 888 888 888 Y8888 88888P'";
echo -e " ${bakblu}rtancman${txtrst}";
echo -e "\n${BGreen} Start...${txtrst}\n";

if [ $UID != 0 ]; then

if [ $DOTFILE_OS == "OSX" ]; then

. sh/osx/main.sh;

elif [ $UID != 0 ]; then

echo -e "${bakred} [Error] You must run with root! ${txtrst}";

elif [[ "DOTFILESEMPTYUSER" == "$DOTFILE_DEFAULT_USER" || "YOUR_USER_HERE" == "$DOTFILE_DEFAULT_USER" ]]; then
Expand All @@ -26,10 +30,6 @@ elif [ ! -e "/$DOTFILE_HOME/$DOTFILE_DEFAULT_USER" ]; then

echo -e "${bakred} [Error] Your local USER do not exists! ${txtrst}";

elif [ $DOTFILE_OS == "OSX" ]; then

. sh/osx/main.sh;

else

osrelease="$(cat /etc/*-release)"
Expand Down
18 changes: 8 additions & 10 deletions sh/osx/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ echo -e "${bakblu}[MacOSX][Install][Start]${txtrst}\n";
. sh/osx/scripts/brew.sh;
. sh/osx/scripts/brew-cask.sh;
. sh/osx/scripts/git.sh;
. sh/osx/scripts/ruby.sh;
. sh/osx/scripts/svn.sh;
. sh/osx/scripts/the_silver_searcher.sh;
. sh/osx/scripts/jq.sh;
. sh/osx/scripts/python-workspace.sh;
#. sh/osx/scripts/ruby.sh;
#. sh/osx/scripts/svn.sh;
# . sh/osx/scripts/jq-command-line-JSON-processor.sh;
# . sh/osx/scripts/skype.sh;
# . sh/osx/scripts/chrome.sh;
Expand All @@ -25,13 +27,9 @@ echo -e "${bakblu}[MacOSX][Install][Start]${txtrst}\n";
# . sh/osx/scripts/vlc.sh;
# . sh/common/vim-bootstrap/main.sh;
# . sh/common/ngrok/main.sh;
# . sh/osx/scripts/sublimetext3.sh;
# . sh/common/sublime/main.sh;
# . sh/osx/scripts/git-flow.sh;
# . sh/common/git-flow-completion/main.sh;
# . sh/common/meetfranz/main.sh;
# . sh/osx/scripts/nodejs.sh;
# . sh/osx/scripts/phpstorm.sh;
# . sh/osx/scripts/pycharm.sh;
. sh/osx/scripts/sublimetext.sh;
. sh/osx/scripts/atom.sh;
. sh/osx/scripts/franz.sh;


echo -e "\n${bakblu}[MacOSX][Install][Finish]${txtrst}";
17 changes: 17 additions & 0 deletions sh/osx/scripts/atom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

ATOM_IS_AVAILABLE="$(atom --version 2>&1 >/dev/null)"

if [[ ${ATOM_IS_AVAILABLE} == '' ]]; then

echo -e "${bakgrn}[installed][atom]${txtrst}" ;

else

echo -e "${bakcyn}[atom] Start Install ${txtrst}";

brew cask install atom

echo -e "${bakgrn}[atom] Finish Install ${txtrst}";

fi
16 changes: 8 additions & 8 deletions sh/osx/scripts/brew-cask.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/sh

BREWCASKROOM_IS_AVAILABLE="$(sudo -u $DOTFILE_DEFAULT_USER brew cask --version 2>&1 >/dev/null)"
BREWCASKROOM_IS_AVAILABLE="$(brew cask --version 2>&1 >/dev/null)"

if [[ ${BREWCASKROOM_IS_AVAILABLE} == '' ]]; then
echo -e "${bakgrn}[installed][brew-cask]${txtrst} already installed ;)" ;

echo -e "${bakgrn}[installed][brew-cask]${txtrst}" ;

else

echo -e "${bakcyn}[brew-cask] Start Install ${txtrst}";
sudo -u $DOTFILE_DEFAULT_USER brew tap caskroom/cask

brew tap caskroom/cask

echo -e "${bakgrn}[brew-cask] Finish Install ${txtrst}";

fi
fi
16 changes: 8 additions & 8 deletions sh/osx/scripts/brew.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/sh

BREW_IS_AVAILABLE="$(sudo -u $DOTFILE_DEFAULT_USER brew --version 2>&1 >/dev/null)"
BREW_IS_AVAILABLE="$(brew --version 2>&1 >/dev/null)"

if [[ ${BREW_IS_AVAILABLE} == '' ]]; then
echo -e "${bakgrn}[installed][Brew]${txtrst} already installed ;)" ;

echo -e "${bakgrn}[installed][Brew]${txtrst}" ;

else

echo -e "${bakcyn}[Brew] Start Install ${txtrst}";
sudo -u $DOTFILE_DEFAULT_USER /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

echo -e "${bakgrn}[Brew] Finish Install ${txtrst}";

fi
fi
17 changes: 17 additions & 0 deletions sh/osx/scripts/franz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

FRANZ_IS_AVAILABLE="$(brew cask list | grep franz --version 2>&1 >/dev/null)"

if [[ ${FRANZ_IS_AVAILABLE} == '' ]]; then

echo -e "${bakgrn}[installed][franz]${txtrst}" ;

else

echo -e "${bakcyn}[franz] Start Install ${txtrst}";

brew cask install franz

echo -e "${bakgrn}[franz] Finish Install ${txtrst}";

fi
16 changes: 8 additions & 8 deletions sh/osx/scripts/git.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/sh

GIT_IS_AVAILABLE="$(sudo -u $DOTFILE_DEFAULT_USER git --version 2>&1 >/dev/null)"
GIT_IS_AVAILABLE="$(git --version 2>&1 >/dev/null)"

if [[ ${GIT_IS_AVAILABLE} == '' ]]; then
echo -e "${bakgrn}[installed][Git]${txtrst} already installed ;)" ;

echo -e "${bakgrn}[installed][Git]${txtrst}" ;

else

echo -e "${bakcyn}[Git] Start Install ${txtrst}";
sudo -u $DOTFILE_DEFAULT_USER brew install git

brew install git

echo -e "${bakgrn}[Git] Finish Install ${txtrst}";

fi
fi
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/sh

JQ_IS_AVAILABLE="$(sudo -u $DOTFILE_DEFAULT_USER jq --version 2>&1 >/dev/null)"
JQ_IS_AVAILABLE="$(jq --version 2>&1 >/dev/null)"

if [[ ${JQ_IS_AVAILABLE} == '' ]]; then

echo -e "${bakgrn}[installed][jq command-line JSON processor]${txtrst} already installed ;)" ;
echo -e "${bakgrn}[installed][jq command-line JSON processor]${txtrst}" ;

else

echo -e "${bakcyn}[jq command-line JSON processor] Start Install ${txtrst}";

sudo -u $DOTFILE_DEFAULT_USER brew install jq
brew install jq

echo -e "${bakgrn}[jq command-line JSON processor] Finish Install ${txtrst}";

Expand Down
Loading

0 comments on commit 3762aee

Please sign in to comment.