dotbrains / lynx

💾 A shell script to bootstrap a Linux laptop (or Desktop) into a development machine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lynx

Lynx is a script to set up a Linux laptop for web development.

It can be run multiple times on the same machine safely. It installs, upgrades, or skips packages based on what is already installed on the machine.

Requirements / Install / Debugging / What it sets up / Customize in ~/.lynx.local / Inspiration / License

Requirements

Lynx supports:

  • Ubuntu 17.04

Older versions may work but aren't regularly tested. Bug reports for older versions are welcome.

Install

Download the script:

curl --remote-name https://raw.githubusercontent.com/dotbrains/Lynx/master/src/lynx

Review the script (avoid running scripts you haven't read!):

less lynx

Execute the downloaded script:

bash lynx 2>&1 | tee ~/lynx.log

Optionally, review the log:

less ~/lynx.log

Optionally, install dotbrains/dotfiles.

Debugging

Your last Lynx run will be saved to ~/lynx.log. Read through it to see if you can debug the issue yourself. If not, copy the lines where the script failed into a new GitHub Issue for me. Or, attach the whole log file as an attachment.

What it sets up

Linux tools:

  • Linuxbrew for managing operating system libraries.

Unix tools:

  • Exuberant Ctags for indexing files for vim tab completion
  • Git for version control
  • OpenSSL for Transport Layer Security (TLS)
  • RCM for managing company and personal dotfiles
  • The Silver Searcher for finding things in files
  • Tmux for saving project state and switching between projects
  • Watchman for watching for filesystem events
  • zsh as your shell

Heroku tools:

GitHub tools:

  • Hub for interacting with the GitHub API

Image tools:

Testing tools:

Programming languages, package managers, and configuration:

  • ASDF for managing programming language versions
  • Bundler for managing Ruby libraries
  • Node.js and NPM, for running apps and installing JavaScript packages
  • Ruby stable for writing general-purpose code
  • Yarn for managing JavaScript packages

Databases:

  • Postgres for storing relational data
  • Redis for storing key-value data

It bashould take less than 15 minutes to install (depends on your machine).

Customize in ~/.lynx.local

Your ~/.lynx.local is run at the end of the Lynx script. Put your customizations there. For example:

#!/bin/bash

brew bundle --file=- <<EOF
brew "Caskroom/cask/dockertoolbox"
brew "go"
brew "ngrok"
brew "watch"
EOF

default_docker_machine() {
  docker-machine ls | grep -Fq "default"
}

if ! default_docker_machine; then
  docker-machine create --driver virtualbox default
fi

default_docker_machine_running() {
  default_docker_machine | grep -Fq "Running"
}

if ! default_docker_machine_running; then
  docker-machine start default
fi

echo "Cleaning up old Homebrew formulae ..."
brew cleanup
brew cask cleanup

if [ -r "$HOME/.rcrc" ]; then
  echo "Updating dotfiles ..."
  rcup
fi

Write your customizations such that they can be run safely more than once. See the lynx script for examples.

Lynx functions such as gem_install_or_update can be used in your ~/.lynx.local.

Inspiration

Thoughtbot

License

Lynx is © Nicholas Adamou.

It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

💾 A shell script to bootstrap a Linux laptop (or Desktop) into a development machine.

License:Other


Languages

Language:Shell 100.0%