The Meowgorithm Dotfiles, Collectors’ Edition
#!/usr/bin/env bash
set -euo pipefail
source "$PWD/bash/bash_funcs"
usage() {
echo "Usage: $0 [link|remove|update]"
exit 1
}
if [ -z "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$HOME/.config"
fi
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$HOME/.local/share"
fi
# What operation to perform: link, remove, or update.
OP="${1:-}"
if [[ "$OP" == "" ]]; then
OP="link"
fi
if [[ "$OP" != "link" && "$OP" != "remove" && "$OP" != "update" ]]; then
usage
fi
GREEN_CHECK="$(printf '\x1b[32m✓\x1b[m')"
BLACK=0
GREEN=2
YELLOW=3
BLUE=4
WHITE=7
# Print a status message with colors.
status() {
local text="$1"
local bg_color="$2"
local fg_color="$3"