Giter Club home page Giter Club logo

akinizer's People

Contributors

dependabot[bot] avatar robatron avatar

Watchers

 avatar  avatar  avatar

akinizer's Issues

Fix semantics

  • Add EXEC_JOBS
  • Pluralize all actions, include target
  • installCommands -> actionCommands
  • "Package" -> "Job" ?
  • packagOpts -> targetOpts
  • skipAction bool -> fn
  • testFn -> forceAction
  • isPackageInstalled -> general verify (split?)
  • Add action handlers
  • Update unit tests (execUtils.js)

Add base utilities

  • cowsay
  • fortune (Mac) / fortune-mod (Linux)
  • gpg
  • shuf (Mac) / symlink to gshuf (Linux)
  • pyenv

Linux only:

  • zsh

Mac only:

  • caskroom/homebrew-cask
  • coreutils
  • reattach-to-user-namespace
  • tmux

Git package improvements

  • Move isPackageInstalled to its own module
  • Move installGitPackage "
  • Move installPackage "
  • Rm packageUtils.js references
  • Rm all "clearAllMocks"
  • Allow custom destination (test w/ oh-my-zsh and spaceship-prompt)
  • Fix binSymlink, postInstall
  • Allow to specify tag, hash, etc.

Add packages to e2e gulpfile

Assure we've implemented all package installation from old installer file:

Bootstrapping programs

Base programs

  • homebrew
  • git
  • python3
  • python3-distutils (Linux only)
  • pip
log "Looking for system package managers..."
if [ "$system_type" = "Darwin" ]; then

    log "Mac OS X detected. Looking for brew..."
    if ! [ -x "$(command -v brew)" ]; then
        log "Homebrew missing. Installing homebrew..."
        /usr/bin/ruby -e \
            "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    fi

    assure_installed_mac git
    assure_installed_mac python3

elif [ "$system_type" = "Linux" ]; then

    log "Linux detected. Looking for apt..."
    if ! [ -x "$(command -v apt)" ]; then
        logw  "apt isn't available and I don't know what to do :-("
        exit 1
    fi

    assure_installed_linux git
    assure_installed_linux python3
    assure_installed_linux python3-distutils
fi

seek_prog='pip'
log "Looking for $seek_prog..."
if ! [ -x "$(command -v $seek_prog)" ]; then
    log "$seek_prog missing. Installing..."
    sudo curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
    sudo -H python3 /tmp/get-pip.py
fi

Dotfiles

  • envtpl
  • yadm
  • dotfiles
# Envtpl required by yadm
seek_prog='envtpl'
log "Looking for $seek_prog..."
if ! [ -x "$(command -v $seek_prog)" ]; then
    log "$seek_prog missing. Installing..."
    sudo -H pip install envtpl
fi

seek_prog='yadm'
log "Looking for $seek_prog..."
if ! [ -x "$(command -v $seek_prog)" ]; then
    log "$seek_prog missing. Installing..."
    install_program_via_git "https://github.com/TheLocehiliosan/yadm.git" $git_install_dir/yadm
    log "Adding $seek_prog bin to path..."
    mkdir -p $HOME/bin
    ln -sf $git_install_dir/yadm/yadm $HOME/bin/
fi

log "Cloning dotfiles..."
if [ -d $yadm_repo_dir ]; then
    logw "$yadm_repo_dir exists. Using existing dotfiles. (Do 'yadm pull' to update)"
else
    yadm clone $dotfiles_url
fi

System-specific programs

Mac-specific programs

  • coreutils
  • cowsay
  • fortune
  • gpg
  • reattach-to-user-namespace
  • tmux
  • pyenv
  • git (prereq)
  • neovim (no longer needed)
  • zplug (no longer needed)
    if [ -f "$HOME/.Brewfile" ]; then
        log "Installing programs specified in .Brewfile..."
        brew bundle --global # Consolodate from .Brewfile?

Linux-specific

  • gpg
  • zsh
  • cowsay
  • fortune-mod
  • gshuf
  • neovim (no longer needed)
 log "Linux detected. Looking for apt..."

    packages_to_install="neovim gpg zsh cowsay fortune-mod"

    if [ -x "$(command -v apt)" ]; then
        log "Installing packages via apt..."
        sudo apt install -y $packages_to_install
        ln -sf $(which shuf) $HOME/bin/gshuf # normalize shuf between systems
    else
        logw "Can't install packages via apt and I don't know what to do :-("
        exit 1;
    fi

Common programs

  • pyenv
  • nvm
  • oh-my-zsh
  • spaceship-prompt
  • powerline
    seek_prog="pyenv"
    log "Looking for $seek_prog..."
    if [ ! -x "$(command -v $seek_prog)" ]; then
        log "Installing $seek_prog..."

        # See https://github.com/pyenv/pyenv-installer
        curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
    fi

seek_prog="nvm"
log "Looking for $seek_prog..."
export NVM_DIR="$HOME/.$seek_prog"
if [ ! -d $NVM_DIR ]; then
    # See https://github.com/creationix/nvm#manual-install
    git clone https://github.com/creationix/nvm.git "$NVM_DIR"
    cd "$NVM_DIR"
    git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`

    log "Loading $seek_prog"
    . "$NVM_DIR/nvm.sh"

    log "Installing latest LTS version of node..."
    nvm install --lts
fi

seek_prog="oh-my-zsh"
log "Looking for $seek_prog..."
export OMZSH_DIR="$HOME/.$seek_prog"
if [ ! -d $OMZSH_DIR ]; then
    log "Installing $seek_prog..."

    # Sed is to chop out starting ZSH so it doesn't interrupt our installation
    curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh \
        | sed "s/exec zsh -l.*$//g" \
        > /tmp/install-$seek_prog
    bash /tmp/install-$seek_prog

    if [ -f "$HOME/.zshrc.pre-oh-my-zsh" ]; then
        log "Fixup .zshrc files..."
        cp $HOME/.zshrc.pre-oh-my-zsh $HOME/.zshrc
    fi
fi

seek_prog="spaceship-prompt"
log "Looking for $seek_prog..."
export SPACESHIP_THEME_DIR="$OMZSH_DIR/themes/spaceship-prompt"
if [ ! -d $SPACESHIP_THEME_DIR ]; then
    log "Installing $seek_prog..."
    git clone https://github.com/denysdovhan/spaceship-prompt.git $SPACESHIP_THEME_DIR
    ln -s "$SPACESHIP_THEME_DIR/spaceship.zsh-theme" "$OMZSH_DIR/themes/spaceship.zsh-theme"
fi

# Powerline fonts are for spaceship-prompt
seek_prog="powerline"
log "Looking for $seek_prog..."
if [ ! -d "$git_install_dir/$seek_prog" ]; then
    log "Installing $seek_prog..."
    if [ -d "$HOME/.local" ]; then
        sudo chown -R $USER: $HOME/.local
    fi
    install_program_via_git "https://github.com/powerline/fonts.git" $git_install_dir/$seek_prog
    $git_install_dir/$seek_prog/install.sh
fi

Mac-specific GUI programs (low priority)

  • deluge
  • google-chrome
  • iterm2
  • keepingyouawake
  • spectacle
  • visual-studio-code
  • vagrant
  • virtualbox
        if [ ! -z $INSTALL_GUI_PROGS ]; then
            log "Installing GUI programs..."
            brew cask install \
                deluge \
                google-chrome \
                iterm2 \
                keepingyouawake \
                spectacle \
                vagrant \
                virtualbox \
                visual-studio-code
        else
            logw "Skipping GUI program installations..."
        fi
    fi

Add dotfiles

  • move dotfiles to GitHub as private repo
  • Install yadm
  • Install dotfiles themselves

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.