44 lines
889 B
Bash
Executable file
44 lines
889 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# --- Functions ---
|
|
# Styling
|
|
function styleColor {
|
|
# Arguments
|
|
color=$1
|
|
|
|
if [ "${color}" == "red" ]; then
|
|
echo -e "\e[0;31m"
|
|
elif [ "${color}" == "green" ]; then
|
|
echo -e "\e[0;32m"
|
|
elif [ "${color}" == "yellow" ]; then
|
|
echo -e "\e[0;33m"
|
|
elif [ "${color}" == "blue" ]; then
|
|
echo -e "\e[0;34m"
|
|
elif [ "${color}" == "purple" ]; then
|
|
echo -e "\e[0;35m"
|
|
elif [ "${color}" == "cyan" ]; then
|
|
echo -e "\e[0;36m"
|
|
fi
|
|
}
|
|
function styleColorRst {
|
|
echo -e "\e[0m"
|
|
}
|
|
function styleTitle {
|
|
# Arguments
|
|
title=$1
|
|
|
|
titleLen=${#title}
|
|
titleLen=$((titleLen + 2))
|
|
bars="+"
|
|
for (( i=0; i<${titleLen}; i++ )); do
|
|
bars="${bars}-"
|
|
done
|
|
bars="${bars}+"
|
|
echo -e "\t${bars}"
|
|
echo -e "\t| $(styleColor "purple")${title}$(styleColorRst) |"
|
|
echo -e "\t${bars}"
|
|
}
|
|
# Packages
|
|
|
|
# --- Entry Point ---
|
|
styleTitle "OBJNULL Dotfile Installer"
|