This commit is contained in:
2019-08-22 17:16:21 -05:00
parent 4c34e7892f
commit e285ef2e29
3 changed files with 52 additions and 27 deletions

View File

@@ -5,6 +5,8 @@ if [ $path = 'c' ]; then
source ./esc.sh
fi
source ./_lib/functions.sh
# FF colors
# ------------------------------------------------------------------------------
# ff4500 - #ff4500
@@ -62,20 +64,24 @@ bg_lightpurple_w_blk="${esc_seq_fg}${c_black}${esc_seq_bg}${base_lightpurple}"
function print_ff() {
clear
echo
echo -e "${fg_darkgrey_01}------------------------------------------------------------${reset}"
echo -e "${fg_darkgrey_01} ------------------------------------------------------- ${reset}"
echo
echo -e "${indent}${indent}${bg_darkpurple} Base colors: ${reset}"
indent; indent; echo -e "${bg_darkpurple} Base colors: ${reset}"
echo
for var in "${!fg_@}"; do
#printf '%s=%s\n' "$var" "${!var}"
printf "${var} ${fg_lightgrey}(%s)${reset}: ${esc_seq_fg}${!var}${var}${reset}\n" "${!var:10}"
indent;
indent;
printf "${ind}${ind}${var} ${fg_lightgrey}(%s)${reset}: ${esc_seq_fg}${!var}${var}${reset}\n" "${!var:10}"
done
echo
for var in "${!bg_@}"; do
printf "${var}: ${!var} ${var} ${reset}\n"
indent;
indent;
printf "${indent}${indent}${var}: ${!var} ${var} ${reset}\n"
done
echo
echo -e "${fg_darkgrey_01}------------------------------------------------------------${reset}"
echo -e "${fg_darkgrey_01} -------------------------------------------------------- ${reset}"
echo
}
if [ $path = 'c' ]; then

View File

@@ -7,18 +7,18 @@
#
# ------------------------------------------------------------------------------
# User specified directories
# User specified directories (no trailing slashes!)
# ------------------------------------------------------------------------------
# base_dir="/Volumes/xxx/xxx/xxx"
# source_repo_dir="repos"
# output_dir="archive"
# repo_list="${base_dir}/_src/repo_list.txt"
#
# # Variables for functions - Don't mess with these
# # ------------------------------------------------------------------------------
# filelines="$(cat $repo_list)"
# source="${base_dir}/${source_repo_dir}"
# output="${base_dir}/${output_dir}"
base_dir="~/Desktop/test"
source_repo_dir="repos"
output_dir="archive"
repo_list="${base_dir}/_src/repo_list.txt"
# Variables for functions - Don't mess with these
# ------------------------------------------------------------------------------
filelines="$(cat $repo_list)"
source="${base_dir}/${source_repo_dir}"
output="${base_dir}/${output_dir}"
# Debugging
# ------------------------------------------------------------------------------

View File

@@ -1,10 +1,14 @@
#!/usr/bin/env bash
# Indention - for reuse
# -----------------------------------------------
ind=" "
indent() {
local ind=" "
printf "${ind}"
}
# Seperators
# -----------------------------------------------
sep() {
local ch="-"
local sep_line="$(printf '%*s' "60" | tr ' ' "$ch")"
@@ -12,19 +16,34 @@ sep() {
#echo -e "-----------------------------------------------------------------------------"
}
# Check directory existence
# -----------------------------------------------
# if [ ! -d "${source}" ]; then
# mkdir ${source}
# fi
#
# if [ ! -d "${output}" ]; then
# mkdir ${output}
# fi
#
#
if [ ! -d "${base_dir}" ]; then
echo -e "Base dir doesn't exist. Making it now."
echo -e "mkdir ${base_dir}"
#mkdir ${source}
else
echo -e "Base dir exists at ${base_dir}"
fi
if [ ! -d "${source}" ]; then
echo -e "Source dir doesn't exist. Making it now."
echo -e "mkdir ${source}"
#mkdir ${source}
else
echo -e "Source dir exists at ${source}"
fi
if [ ! -d "${output}" ]; then
echo -e "Output dir doesn't exist. Making it now."
echo -e "mkdir ${output}"
#mkdir ${output}
else
echo -e "Output dir exists at ${output}"
fi
# # Clone everything in repo_list to source folder
# # -----------------------------------------------
#