Commit 179326a2 authored by User expired's avatar User expired
Browse files

bib-name: Fix renaming files in subdirectory

Slashes must be removed from the non directory part only.
parent 109d20c5
......@@ -112,11 +112,12 @@ do
fi
# New file names.
newpdfname="$(dirname "$bibfile")/${fauthor}_${year}${letter}_${journal}"
# Drop remaining non ascii characters.
newpdfname=$(echo "$newpdfname" | sed "s/[^$ALLOWED_CHARS]//g")
newpdfname="${newpdfname}.pdf"
newbibname="${newpdfname}.bib"
newpdfname="${fauthor}_${year}${letter}_${journal}"
# Only keep allowed characters.
newpdfname=$(sed "s/[^$ALLOWED_CHARS]//g" <<< "$newpdfname")
# Add path prefix and file suffixes.
newbibname="$(dirname "$bibfile")/${newpdfname}.bib"
newpdfname="$(dirname "$bibfile")/${newpdfname}.pdf"
# Assure safe quoting.
qnewpdfname="${newpdfname//\"/\\\"}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment