support copying support files to git
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
debug="1"
|
debug="1"
|
||||||
force_overwrite=true # Sets the behavour when files exist or not
|
force_overwrite=true # Sets the behavour when files exist or not
|
||||||
|
git_dir="$HOME/sourcecode/hpr/hpr_website" # The git directory for extra assets
|
||||||
processing_dir="$HOME/tmp/hpr/processing" # The directory where the files will be copied to for processing
|
processing_dir="$HOME/tmp/hpr/processing" # The directory where the files will be copied to for processing
|
||||||
theme="${processing_dir}/theme.flac" # The hpr theme
|
theme="${processing_dir}/theme.flac" # The hpr theme
|
||||||
silence="${processing_dir}/silence.flac" # A segment of silence to offset the tts in the intro
|
silence="${processing_dir}/silence.flac" # A segment of silence to offset the tts in the intro
|
||||||
@@ -381,6 +382,16 @@ function check_variable_is_correct() {
|
|||||||
echo_error "The \"genre\" variable is missing."
|
echo_error "The \"genre\" variable is missing."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
git_dir)
|
||||||
|
if [[ -z "${git_dir}" || "${git_dir}" == "null" ]]
|
||||||
|
then
|
||||||
|
echo_error "The \"git_dir\" variable is missing."
|
||||||
|
fi
|
||||||
|
if [[ ! -d "${git_dir}" || ! -d "${git_dir}/.git" ]]
|
||||||
|
then
|
||||||
|
echo_error "The \"git_dir\" variable is missing or file \"${git_dir}\" does not exist."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
HOME)
|
HOME)
|
||||||
if [[ ! -d "${HOME}" || -z "${HOME}" ]]
|
if [[ ! -d "${HOME}" || -z "${HOME}" ]]
|
||||||
then
|
then
|
||||||
@@ -2054,6 +2065,32 @@ function copy_files_to_hpr_server() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
# Copy the images to the hpr server
|
||||||
|
|
||||||
|
function copy_files_to_git() {
|
||||||
|
|
||||||
|
echo_debug "Copying the files to the hpr server. copy_files_to_git()"
|
||||||
|
|
||||||
|
check_variable_is_correct working_dir ep_num git_dir files_json
|
||||||
|
|
||||||
|
if [ ! -d "${git_dir}/www/eps/hpr${ep_num}/" ]
|
||||||
|
then
|
||||||
|
mkdir -v "${git_dir}/www/eps/hpr${ep_num}/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for this_file in $( jq --raw-output ".hpr${ep_num} | keys | @tsv" "${files_json}" )
|
||||||
|
do
|
||||||
|
skip_file="$( echo "$this_file" | grep --count --perl-regexp "hpr${ep_num}.flac|hpr${ep_num}.mp3|hpr${ep_num}.ogg|hpr${ep_num}.opus|hpr${ep_num}.spx|hpr${ep_num}.srt|hpr${ep_num}.txt|hpr${ep_num}.wav" )"
|
||||||
|
if [ "${skip_file}" -eq "1" ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
cp -v "${working_dir}/$this_file" "${git_dir}/www/eps/hpr${ep_num}/"
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
# Send the derived files to the server borg to be sent to borg
|
# Send the derived files to the server borg to be sent to borg
|
||||||
|
|
||||||
@@ -2377,6 +2414,8 @@ check_variable_is_correct working_dir ep_num shownotes_edited
|
|||||||
|
|
||||||
copy_files_to_hpr_server
|
copy_files_to_hpr_server
|
||||||
|
|
||||||
|
copy_files_to_git
|
||||||
|
|
||||||
copy_derived_files_to_borg
|
copy_derived_files_to_borg
|
||||||
|
|
||||||
create_item_on_the_internet_archive
|
create_item_on_the_internet_archive
|
||||||
|
|||||||
Reference in New Issue
Block a user