├── .gitignore ├── CHANGELOG.md ├── MIT-LICENSE ├── README.md ├── archlinux.sh ├── linux.sh └── mac.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore ide and text editor 8 | .idea 9 | .idea/ 10 | .idea/**/* 11 | 12 | # Ignore mac files 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | #### [Current] 3 | 4 | #### 5 | * [6bb2c2e](../../commit/6bb2c2e) - __(Onur Ozgur OZKAN)__ [#1](../../issues/1) install project 6 | * [27a3636](../../commit/27a3636) - __(Onur Ozgur OZKAN)__ Initial commit 7 | -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 lab2023 - information technologies 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Builder 2 | 3 | # Requirements 4 | 5 | ## Mac OS X 6 | 7 | 1) Install Xcode 8 | 9 | 2) Use [Command Line Tools for XCode](https://developer.apple.com/downloads/index.action) for Lion (OS X 10.7) or Mountain Lion (OS X 10.8) or Sierra. 10 | 11 | 3) Set zsh as your login shell: 12 | 13 | chsh -s /bin/zsh 14 | 15 | ## Linux 16 | 17 | We currently support these distributions: 18 | 19 | * [Ubuntu 20.04 LTS: Focal Fossa](https://wiki.ubuntu.com/FocalFossa/ReleaseNotes), 20 | * [Ubuntu 18.04 LTS: Bionic Beaver](https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes), 21 | * [Ubuntu 17.10: Artful Aardvark](https://wiki.ubuntu.com/ArtfulAardvark/ReleaseNotes), 22 | * [Ubuntu 16.04 LTS: Xenial Xerus](https://wiki.ubuntu.com/XenialXerus/ReleaseNotes), 23 | * [Ubuntu 14.04 LTS: Trusty Tahr](https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes), 24 | * Debian stable (currently [stretch](http://www.debian.org/releases/stable/)). 25 | * Debian testing (currently [buster](http://www.debian.org/releases/testing/)). 26 | * [Archlinux](https://www.archlinux.org/) 27 | 28 | Also you can use distributions derived from up these. (Linux Mint, LMDE, Elementary, Pepper Mint, etc.) 29 | 30 | # Use 31 | 32 | ### Mac OS X 33 | 34 | Read, then run the script: 35 | 36 | zsh <(curl -s https://raw.githubusercontent.com/lab2023/builder/develop/mac.sh) 37 | 38 | ### Linux 39 | 40 | Read, then run the script: 41 | 42 | bash <(curl -s https://raw.githubusercontent.com/lab2023/builder/develop/linux.sh) 43 | 44 | # What it does 45 | 46 | # Contributing 47 | 48 | Once you've made your great commits: 49 | 50 | 1. Fork Project 51 | 2. Create a topic branch - git checkout -b my_branch 52 | 3. Push to your branch - git push origin my_branch 53 | 4. Create a Pull Request from your branch 54 | 5. That's it! 55 | 56 | # Credits 57 | 58 | ![lab2023](http://lab2023.com/assets/images/named-logo.png) 59 | 60 | - Builder is maintained and funded by [lab2023 - information technologies](http://lab2023.com/) 61 | - Thank you to all the [contributors!](../../graphs/contributors) 62 | - This gem is inspired from [laptop](https://github.com/thoughtbot/laptop) 63 | - The names and logos for lab2023 are trademarks of lab2023, inc. 64 | 65 | # License 66 | 67 | Copyright 2018 lab2023 – information technologies 68 | -------------------------------------------------------------------------------- /archlinux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Exit trap 4 | trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT 5 | 6 | set -e 7 | 8 | ## Fancy echo 9 | fancy_echo() { 10 | printf "\n%b\n" "$1" 11 | } 12 | 13 | ## Installs the package if it is not installed yet 14 | install() { 15 | pacman -Q "$1" >/dev/null 2>&1 && echo "$1 is already installed." || sudo pacman -S "$1" --noconfirm 16 | } 17 | 18 | ## Authority check 19 | if [[ $UID == 0 ]]; then 20 | fancy_echo "Please run the script without root authority.\nYou need to run it with your home user." 21 | exit 1 22 | fi 23 | 24 | ## Distro check 25 | if ! grep -qiE 'arch' /etc/os-release 26 | then 27 | fancy_echo "Sorry! That script supports only archlinux." 28 | exit 1 29 | fi 30 | 31 | ## Archlinux package update 32 | fancy_echo "Updating system packages ..." 33 | sudo pacman -Syu 34 | 35 | ## Git 36 | fancy_echo "Installing Git, version control system ..." 37 | install "git" 38 | 39 | ## Check home bin 40 | if [ ! -d "$HOME/.bin/" ]; then 41 | mkdir "$HOME/.bin" 42 | fi 43 | 44 | if [ ! -f "$HOME/.zshrc" ]; then 45 | touch $HOME/.zshrc 46 | fi 47 | 48 | if [[ ":$PATH:" != *":$HOME/.bin:"* ]]; then 49 | echo 'export PATH="$HOME/.bin:$PATH"' >> $HOME/.zshrc 50 | fi 51 | 52 | # ZSH and Oh-My-ZSH 53 | fancy_echo "Installing ZSH ..." 54 | install "zsh" 55 | 56 | fancy_echo "Setting ZSH as default, please enter your password:" 57 | chsh -s $(which zsh) 58 | 59 | fancy_echo "Installing Oh-My-ZSH ..." 60 | git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh 61 | cp $HOME/.zshrc $HOME/.zshrc.orig 62 | cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc 63 | 64 | if [ ! -n "$ZSH" ]; then 65 | ZSH=$HOME/.oh-my-zsh 66 | fi 67 | 68 | ## Redis 69 | fancy_echo "Installing Redis, a good key-value database ..." 70 | install "redis" 71 | 72 | ## Extra components 73 | fancy_echo "Installing ImageMagick, to crop and resize images ..." 74 | install "imagemagick" 75 | 76 | fancy_echo "Installing NodeJS, a Javascript runtime ..." 77 | install "nodejs" 78 | 79 | ## Rbenv 80 | if [[ ! -d "$HOME/.rbenv" ]]; then 81 | fancy_echo "Installing rbenv, to change Ruby versions ..." 82 | git clone git://github.com/sstephenson/rbenv.git $HOME/.rbenv 83 | 84 | if ! grep -qs "rbenv init" ~/.zshrc; then 85 | echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.zshrc 86 | 87 | echo 'eval "$(rbenv init - --no-rehash)"' >> $HOME/.zshrc 88 | fi 89 | 90 | export PATH="$HOME/.rbenv/bin:$PATH" 91 | eval "$(rbenv init -)" 92 | fi 93 | 94 | if [[ ! -d "$HOME/.rbenv/plugins/rbenv-gem-rehash" ]]; then 95 | fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..." 96 | git clone https://github.com/sstephenson/rbenv-gem-rehash.git $HOME/.rbenv/plugins/rbenv-gem-rehash 97 | fi 98 | 99 | if [[ ! -d "$HOME/.rbenv/plugins/ruby-build" ]]; then 100 | fancy_echo "Installing ruby-build, to install Rubies ..." 101 | git clone git://github.com/sstephenson/ruby-build.git $HOME/.rbenv/plugins/ruby-build 102 | fi 103 | 104 | ## Ruby dependencies 105 | fancy_echo "Installing dependencies ..." 106 | install "postgresql-libs" 107 | install "sqlite" 108 | install "cmake" 109 | 110 | ## Ruby environment 111 | RUBY_VERSION="2.5.1" 112 | 113 | fancy_echo "Preveting gem system from installing documentation ..." 114 | echo 'gem: --no-ri --no-doc' >> $HOME/.gemrc 115 | 116 | fancy_echo "Installing Ruby $RUBY_VERSION ..." 117 | rbenv install $RUBY_VERSION 118 | 119 | fancy_echo "Setting $RUBY_VERSION as global default Ruby ..." 120 | rbenv global $RUBY_VERSION 121 | rbenv rehash 122 | 123 | fancy_echo "Updating to latest Rubygems version ..." 124 | gem update --system 125 | 126 | fancy_echo "Installing Rails ..." 127 | gem install rails 128 | 129 | fancy_echo "Installing PostgreSQL Ruby interface ..." 130 | gem install pg 131 | 132 | clear 133 | 134 | fancy_echo "Ready and running ZSH ..." 135 | zsh 136 | -------------------------------------------------------------------------------- /linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Exit trap 4 | trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT 5 | 6 | set -e 7 | 8 | ## Fancy echo 9 | fancy_echo() { 10 | printf "\n%b\n" "$1" 11 | } 12 | 13 | ## Distro check 14 | if ! grep -qiE 'focal|bionic|artful|xenial|trusty|stretch|buster' /etc/os-release 15 | then 16 | fancy_echo "Sorry! we don't currently support that distro." 17 | exit 1 18 | fi 19 | 20 | ## Debian-Ubuntu package update 21 | fancy_echo "Updating system packages ..." 22 | if command -v aptitude >/dev/null; then 23 | fancy_echo "Using aptitude ..." 24 | else 25 | fancy_echo "Installing aptitude ..." 26 | sudo apt-get install -y aptitude 27 | fi 28 | sudo aptitude update 29 | 30 | ## Git 31 | fancy_echo "Installing Git, version control system ..." 32 | sudo aptitude install -y git-core 33 | 34 | ## Check home bin 35 | if [ ! -d "$HOME/.bin/" ]; then 36 | mkdir "$HOME/.bin" 37 | fi 38 | 39 | if [ ! -f "$HOME/.zshrc" ]; then 40 | touch $HOME/.zshrc 41 | fi 42 | 43 | if [[ ":$PATH:" != *":$HOME/.bin:"* ]]; then 44 | echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.zshrc 45 | fi 46 | 47 | ## ZSH and Oh-My-ZSH 48 | fancy_echo "Installing ZSH ..." 49 | sudo aptitude install -y zsh 50 | 51 | fancy_echo "Setting ZSH as default, please enter your password:" 52 | chsh -s $(which zsh) 53 | 54 | fancy_echo "Installing Oh-My-ZSH ..." 55 | git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 56 | cp ~/.zshrc ~/.zshrc.orig 57 | cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 58 | 59 | 60 | if [ ! -n "$ZSH" ]; then 61 | ZSH=~/.oh-my-zsh 62 | fi 63 | 64 | ## Redis 65 | fancy_echo "Installing Redis, a good key-value database ..." 66 | sudo aptitude install -y redis-server 67 | 68 | ## Extra components 69 | fancy_echo "Installing ImageMagick, to crop and resize images ..." 70 | sudo aptitude install -y imagemagick 71 | 72 | fancy_echo "Installing libraries for common gem dependencies ..." 73 | sudo aptitude install -y libxslt1-dev libcurl4-openssl-dev libksba8 libksba-dev libqtwebkit-dev libreadline-dev libpq-dev 74 | 75 | fancy_echo "Installing watch, to execute a program periodically and show the output ..." 76 | sudo aptitude install -y watch 77 | 78 | fancy_echo "Installing NodeJS, a Javascript runtime ..." 79 | sudo aptitude install -y nodejs 80 | 81 | ## Rbenv 82 | if [[ ! -d "$HOME/.rbenv" ]]; then 83 | fancy_echo "Installing rbenv, to change Ruby versions ..." 84 | git clone git://github.com/sstephenson/rbenv.git ~/.rbenv 85 | 86 | if ! grep -qs "rbenv init" ~/.zshrc; then 87 | echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc 88 | 89 | echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc 90 | fi 91 | 92 | export PATH="$HOME/.rbenv/bin:$PATH" 93 | eval "$(rbenv init -)" 94 | fi 95 | 96 | if [[ ! -d "$HOME/.rbenv/plugins/rbenv-gem-rehash" ]]; then 97 | fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..." 98 | git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash 99 | fi 100 | 101 | if [[ ! -d "$HOME/.rbenv/plugins/ruby-build" ]]; then 102 | fancy_echo "Installing ruby-build, to install Rubies ..." 103 | git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build 104 | fi 105 | 106 | ## Ruby dependencies 107 | fancy_echo "Installing Ruby dependencies ..." 108 | sudo aptitude install -y zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev 109 | 110 | ## Ruby environment 111 | RUBY_VERSION="3.1.0" 112 | 113 | fancy_echo "Preveting gem system from installing documentation ..." 114 | echo 'gem: --no-ri --no-doc' >> ~/.gemrc 115 | 116 | fancy_echo "Installing Ruby $RUBY_VERSION ..." 117 | rbenv install $RUBY_VERSION 118 | 119 | fancy_echo "Setting $RUBY_VERSION as global default Ruby ..." 120 | rbenv global $RUBY_VERSION 121 | rbenv rehash 122 | 123 | fancy_echo "Updating to latest Rubygems version ..." 124 | gem update --system 125 | 126 | fancy_echo "Installing Rails ..." 127 | gem install rails 128 | 129 | fancy_echo "Installing PostgreSQL Ruby interface ..." 130 | gem install pg 131 | 132 | clear 133 | 134 | fancy_echo "Ready and running ZSH ..." 135 | zsh 136 | -------------------------------------------------------------------------------- /mac.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ## Exit trap 4 | trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT 5 | 6 | set -e 7 | 8 | ## Check home bin 9 | if [ ! -d "$HOME/.bin/" ]; then 10 | mkdir "$HOME/.bin" 11 | fi 12 | 13 | if [[ ":$PATH:" != *":$HOME/.bin:"* ]]; then 14 | echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.zshrc 15 | source ~/.zshrc 16 | fi 17 | 18 | ## Fancy echo 19 | fancy_echo() { 20 | printf "\n%b\n" "$1" 21 | } 22 | 23 | ## Zsh fix 24 | if [[ -f /etc/zshenv ]]; then 25 | fancy_echo "Fixing OSX zsh environment bug ..." 26 | sudo mv /etc/{zshenv,zshrc} 27 | fi 28 | 29 | ## Homebrew 30 | fancy_echo "Installing Homebrew, a good OS X package manager ..." 31 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 32 | brew update 33 | 34 | if ! grep -qs "recommended by brew doctor" ~/.zshrc; then 35 | fancy_echo "Put Homebrew location earlier in PATH ..." 36 | echo "\n# recommended by brew doctor" >> ~/.zshrc 37 | echo "export PATH='/usr/local/bin:$PATH'\n" >> ~/.zshrc 38 | source ~/.zshrc 39 | fi 40 | 41 | ## Oh my zsh 42 | fancy_echo "Installing Oh my zsh, community-driven framework for managing your ZSH configuration ..." 43 | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 44 | 45 | ## Redis 46 | fancy_echo "Installing Redis, a good key-value database ..." 47 | brew install redis 48 | 49 | ## Mac companents 50 | fancy_echo "Installing ImageMagick, to crop and resize images ..." 51 | brew install imagemagick 52 | 53 | fancy_echo "Installing QT, used by Capybara Webkit for headless Javascript integration testing ..." 54 | brew install qt 55 | 56 | fancy_echo "Installing watch, to execute a program periodically and show the output ..." 57 | brew install watch 58 | 59 | ## Rbenv 60 | fancy_echo "Installing rbenv, to change Ruby versions ..." 61 | brew install rbenv 62 | 63 | if ! grep -qs "rbenv init" ~/.zshrc; then 64 | echo 'eval "$(rbenv init -)"' >> ~/.zshrc 65 | 66 | fancy_echo "Enable shims and autocompletion ..." 67 | eval "$(rbenv init -)" 68 | fi 69 | 70 | source ~/.zshrc 71 | 72 | # fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..." 73 | # brew install rbenv-gem-rehash 74 | 75 | fancy_echo "Installing ruby-build, to install Rubies ..." 76 | brew install ruby-build 77 | 78 | fancy_echo "Upgrading and linking OpenSSL ..." 79 | brew install openssl 80 | 81 | #export CC=gcc-4.2 82 | 83 | ## Ruby environment 84 | fancy_echo "Installing Ruby 3.1.1 ..." 85 | rbenv install 3.1.1 86 | 87 | fancy_echo "Setting Ruby 3.1.1 as global default Ruby ..." 88 | rbenv global 3.1.1 89 | rbenv rehash 90 | 91 | fancy_echo "Updating to latest Rubygems version ..." 92 | sudo gem update --system 93 | 94 | fancy_echo "Installing critical Ruby gems for Rails development ..." 95 | gem install rails 96 | 97 | fancy_echo "Installing postgresql..." 98 | brew install postgresql 99 | 100 | fancy_echo "Installing git-flow..." 101 | brew install git-flow 102 | --------------------------------------------------------------------------------