Skip to content

Commit

Permalink
default to title="Quran" if no narration is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa-khaled775 committed Jul 21, 2024
1 parent 567e0a9 commit a3bd633
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build-epub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ echo "successfully built $TITLE.epub!"

# Parse command line arguments
narration="Hafs" # Default narration
title="Quran"
while getopts "n:" opt; do
case $opt in
n)
narration=$OPTARG
title="Quran $narration"
;;
*)
echo "Usage: $0 [-n <narration>]"
Expand Down Expand Up @@ -192,4 +194,4 @@ json_file=${extracted_files%:*}
ttf_file=${extracted_files##*:}

echo "Running builder script..."
build-epub "$json_file" "$ttf_file" "Quran ($narration)"
build-epub "$json_file" "$ttf_file" "$title"

0 comments on commit a3bd633

Please sign in to comment.