archive repo initial push

This commit is contained in:
2019-08-20 20:48:21 -05:00
parent 0ad613fa0c
commit cdca8bfd3d
5 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Sourced colors
# ------------------------------------------------------------------------------
#source ./lib/c/base.sh
# UI colors
# ------------------------------------------------------------------------------
ui_base="${ff_lightpurple_bg}"
ui_accent_light="${ff_lightpurple}"
ui_accent_dark="${ff_darkpurple}"
ui_text_normal=""
ui_text_muted="${ff_lightgrey}"
ui_dialog_bg="${ff_darkgrey_02_bg}"

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# User configuration
# ------------------------------------------------------------------------------
#
#
#
# ------------------------------------------------------------------------------
# User specified directories
# ------------------------------------------------------------------------------
# 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}"
# Debugging
# ------------------------------------------------------------------------------
print_colors="yes"
# Colors - source the colors.sh file
# ------------------------------------------------------------------------------
source ./_lib/colors.sh

View File

@@ -0,0 +1,90 @@
#!/usr/bin/env bash
indent() {
local ind=" "
printf "${ind}"
}
sep() {
local ch="-"
local sep_line="$(printf '%*s' "60" | tr ' ' "$ch")"
echo -e "${indent}${grey}${sep_line}${reset}${indent}"
#echo -e "-----------------------------------------------------------------------------"
}
# Check directory existence
# -----------------------------------------------
# if [ ! -d "${source}" ]; then
# mkdir ${source}
# fi
#
# if [ ! -d "${output}" ]; then
# mkdir ${output}
# fi
#
#
# # Clone everything in repo_list to source folder
# # -----------------------------------------------
#
# while read line; do
# #echo -e "git clone $line";
# git -C $source/ clone --quiet $line
# done < ${repo_list}
#
#
# # Archive repos
# # -----------------------------------------------
#
# cd ${source}
#
# for dir in */
# do
# base=$(basename "$dir")
# tar -czf "${base}.tar.gz" "$dir"
# done
#
#
# # Copy archive files to output folder
# # -----------------------------------------------
#
# mv *.tar.gz ${output}
# Cleanup
# -----------------------------------------------
zzz (){
for line in $filelines; do
suffix=".git"
pre="${line##*/}"
pre=${pre%"${suffix}"}
f="${output}/${pre}.tar.gz"
if [ ! -f "$f" ]; then
sep
echo
indent; echo -e "WARNING: FILE DOES NOT EXIST!"
echo
indent; echo -e "${pre}.tar.gz should have been automatically created in"
indent; echo -e "${f},"
indent; echo -e "but for some reason it wasn't."
indent; echo
indent; echo -e "Check the source directory and try to run the archive operation manually:"
indent; echo -e "tar -czf $(echo "${pre}").tar.gz $(echo "${output}/")"
echo
sep
# else
# echo -e "It's there! \c"
# echo -e "${f}"
fi
done
}
#zzz
run() {
sep
indent; echo "Yay"
sep
}