robatron / akinizer Goto Github PK
View Code? Open in Web Editor NEWA simple configuration management tool written in JavaScript for fun and practice
License: MIT License
A simple configuration management tool written in JavaScript for fun and practice
License: MIT License
isPackageInstalled
-> general verify (split?)Unfortunately this didn't work. Investigate and fix.
Linux only:
Mac only:
See robatron/piq setup.
Like exec outputs
Assure we've implemented all package installation from old installer file:
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
# 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
if [ -f "$HOME/.Brewfile" ]; then
log "Installing programs specified in .Brewfile..."
brew bundle --global # Consolodate from .Brewfile?
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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.