Fix: processes when post changed

This commit is contained in:
Cyrille L 2022-03-29 10:33:52 +02:00
parent 2965e066dc
commit fcfc576e85
1 changed files with 29 additions and 38 deletions

View File

@ -45,34 +45,12 @@ do
gsl__db_get_post_datas "$1"
gsl__db_compare_post_hash
# From COMMAND [OPT]
case "$1" in
check)
if ! [[ "$gsl_force_check" ]];then
! [[ "$gsl_post_new_hash" ]] && continue
fi
gsl__logs_print \
"$gsl_log_i" \
"Reading" \
"Post" \
"$gsl_post" \
"${PWD}"
gsl__all_checkers
;;
make)
gsl__post_begin
gsl__get_needed_headers
gsl__page_prepare_datas
case "$gsl_db_post_status" in
chk)
gsl__all_makers
;;
*)
if [[ "$gsl_post_new_hash" ]];then
unset gsl_db_post_status
if [[ -f "$gsl_srv_wip_page" ]];then
rm -f "$gsl_srv_wip_page" && \
gsl__logs_print \
@ -91,7 +69,32 @@ do
"file ; $gsl_post has changed" \
"$gsl_file_db_post"
fi
else
fi
# From COMMAND [OPT]
case "$1" in
check)
if ! [[ "$gsl_force_check" ]];then
! [[ "$gsl_post_new_hash" ]] && continue
fi
gsl__logs_print \
"$gsl_log_i" \
"Reading" \
"Post" \
"$gsl_post" \
"${PWD}"
gsl__all_checkers
;;
make)
case "$gsl_db_post_status" in
chk)
gsl__all_makers
;;
*)
if ! [[ "$gsl_post_new_hash" ]];then
# Should not be used...
[[ "$gsl_force_make" ]] \
&& gsl__all_makers \
@ -134,15 +137,11 @@ do
;;
www)
gsl__post_begin
gsl__get_needed_headers
gsl__page_prepare_datas
gsl_checker_war=true
case "$2" in
add)
case "$gsl_db_post_status" in
wip)
wip|www)
rsync -a --delete \
"$gsl_srv_wip_page" "$gsl_srv_www_page" && \
gsl__logs_print \
@ -153,14 +152,6 @@ do
"$gsl_srv_www_page"
gsl__db_set_post_status www
;;
www)
gsl__logs_print \
"$gsl_log_w" \
"SRV" \
"www" \
"$gsl_post_type $gsl_post already synced" \
"$gsl_srv_www_page"
;;
*)
gsl__logs_print \
"$gsl_log_e" \