mirror of
https://github.com/ff4500/utilities.git
synced 2026-07-01 11:47:04 -05:00
edits
This commit is contained in:
4
images/make_250x250_thumbnails/go.sh
Normal file → Executable file
4
images/make_250x250_thumbnails/go.sh
Normal file → Executable file
@@ -8,13 +8,11 @@ if [ ! -d "$output_dir" ]; then
|
||||
mkdir -p "$output_dir"
|
||||
fi
|
||||
|
||||
for notpornimages in $input_dir/*.{$exts} ; do
|
||||
|
||||
for notpornimages in $input_dir/*."{$exts}" ; do
|
||||
convert "$notpornimages" \
|
||||
-thumbnail 250x250^ \
|
||||
-gravity center \
|
||||
-extent 250x250 \
|
||||
-set filename:fname '%t_thumb' \
|
||||
"$output_dir"/'%[filename:fname].jpg'
|
||||
|
||||
done
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,5 +19,24 @@ opening_title
|
||||
|
||||
# Install Homebrew
|
||||
# ----------------------------------------------------------------
|
||||
running "Checking homebrew..."
|
||||
install_homebrew
|
||||
running "Checking on Homebrew..."
|
||||
check_homebrew
|
||||
|
||||
seperator
|
||||
|
||||
# Install Homebrew Cask (for non-brew applications)
|
||||
# ----------------------------------------------------------------
|
||||
running "Checking on Homebrew Casks..."
|
||||
check_brewcask
|
||||
|
||||
seperator
|
||||
|
||||
check_iterm2
|
||||
|
||||
seperator
|
||||
|
||||
check_atom
|
||||
|
||||
seperator
|
||||
|
||||
check_im
|
||||
|
||||
Reference in New Issue
Block a user