This commit is contained in:
2019-07-03 09:16:56 -05:00
parent 17aa522c58
commit e0db69b64d
4 changed files with 72 additions and 25 deletions

View File

@@ -1,28 +1,31 @@
#!//bin/bash
###
# some colorized echo helpers
# @author Adam Eivy
# https://raw.githubusercontent.com/atomantic/dotfiles/master/lib_sh/echos.sh
###
# ---------------------------------------------------------------------------- #
# Colorized echo helpers and functions
# Original work based on the echos.sh script by @author Adam Eivy:
# https://github.com/atomantic/dotfiles/blob/master/lib_sh/echos.sh
# ---------------------------------------------------------------------------- #
# Colors
# ----------------------------------------------------------------
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
COL_CYAN=$ESC_SEQ"36;01m"
SEP_COLOR=$ESC_SEQ"36;01m"
COL_RESET=${ESC_SEQ}"39;49;00m"
COL_RED=${ESC_SEQ}"31;01m"
COL_GREEN=${ESC_SEQ}"32;01m"
COL_YELLOW=${ESC_SEQ}"33;01m"
COL_BLUE=${ESC_SEQ}"34;01m"
COL_MAGENTA=${ESC_SEQ}"35;01m"
COL_CYAN=${ESC_SEQ}"36;01m"
SEP_COLOR=${ESC_SEQ}"36;01m"
COL_DIM=$ESC_SEQ"2;49;90m"
SEP_COLOR_DIM=$ESC_SEQ"38;5;8m"
DIMDOTS=$ESC_SEQ"2;49;90m..."$COL_RESET
COL_DIM=${ESC_SEQ}"2;49;90m"
SEP_COLOR_DIM=${ESC_SEQ}"38;5;8m"
DIMDOTS=${ESC_SEQ}"2;49;90m..."${COL_RESET}
COL_PURPLE_BG=$ESC_SEQ"38;2;0;0;0m"$ESC_SEQ"48;2;110;0;255m"
COL_PURPLE_BG=${ESC_SEQ}"38;2;0;0;0m"${ESC_SEQ}"48;2;110;0;255m"
# Variables
# ----------------------------------------------------------------
columns="$(tput cols)"
ov_sep="-------------------------------------------------"
open_vers_1="MacOS install script - v0.0.1"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
function install_homebrew() {
function check_homebrew() {
brew_check=$(command -v brew) > /dev/null 2>&1
if [[ $? != 0 ]]; then
@@ -26,8 +26,8 @@ function install_homebrew() {
fi
}
function install_brewcask() {
output=$(command -v brew cask --version) > /dev/null 2>&1
function check_brewcask() {
cask_check=$(command -v brew cask --version) > /dev/null 2>&1
if [[ $? != 0 ]]; then
echo -e "brew-cask is not installed"
else
@@ -35,8 +35,35 @@ function install_brewcask() {
fi
}
function check_iterm2 () {
iterm_check=$(echo $TERM_PROGRAM) > /dev/null 2>&1
if [[ $? != 0 ]]; then
echo -e "You don't have iterm2 installed. Installing..."
require_cask iterm2
else
echo -e "iterm2 is already installed. Moving on."
fi
}
function check_atom () {
atom_check=$(command -v atom) > /dev/null 2>&1
if [[ $? != 0 ]]; then
echo -e "You don't have Atom installed. Installing..."
require_cask atom
else
echo -e "Atom is already installed. Moving on."
fi
}
function check_im () {
im_check=$(command -v convert) > /dev/null 2>&1
if [[ $? != 0 ]]; then
echo -e "You don't have ImageMagick installed. Installing..."
require_brew imagemagick
else
echo -e "ImageMagick is already installed. Moving on."
fi
}
# source ./echos.sh