removing line breaks on more sed chains

This commit is contained in:
James Tomasino 2018-03-16 20:37:12 -04:00
parent 0ea68ff866
commit ea10ed8356
1 changed files with 2 additions and 6 deletions

8
burrow
View File

@ -324,9 +324,7 @@ function make_post_paths {
if $use_gophermap; then
title_slug=$(echo "${title}" | \
sed -E -e 's/[^[:alnum:]]/-/g' -e 's/^-+|-+$//g' | \
tr -s '-' | \
tr '[:upper:]' '[:lower:]')
sed -E -e 's/[^[:alnum:]]/-/g' -e 's/^-+|-+$//g' | tr -s '-' | tr '[:upper:]' '[:lower:]')
if $use_date; then
post_dir="${config_dir_gopher}${post_type}/$(date +%Y%m%d)-$title_slug"
post_path="${config_gopher_root}${post_type}/$(date +%Y%m%d)-$title_slug"
@ -340,9 +338,7 @@ function make_post_paths {
post_dir="${config_dir_gopher}${post_type}"
post_path="${config_gopher_root}${post_type}"
title_slug=$(echo "${title}" | \
sed -E -e 's/[^[:alnum:]]/-/g' -e 's/^-+|-+$//g' | \
tr -s '-' | \
tr '[:upper:]' '[:lower:]')
sed -E -e 's/[^[:alnum:]]/-/g' -e 's/^-+|-+$//g' | tr -s '-' | tr '[:upper:]' '[:lower:]')
if $use_date; then
title_slug="$(date +%Y%m%d)-${title_slug}"
fi