paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 43541d5f8f4345a920a9836eceac3195ab7b3af9
parent 235619a1bc41027d41eefcd0076ca18b2092af4e
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat,  8 Feb 2020 22:57:10 -0500

Add check for file existing before compiling

Diffstat:
Mcompile | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/compile b/compile @@ -22,6 +22,18 @@ mkdir -p "$cssdir" mkdir -p "$htmldir" for file in $@; do + + if [[ ! -f "$file" ]]; then + tput setaf 1; tput bold; + printf " ERROR: File " + tput smul + printf "%s" "$file"; tput sgr0 + tput setaf 1; tput bold; + printf " not found.\n\n" + tput sgr0 + continue; + fi + filename=$(basename "$file" | cut -f 1 -d '.') fileextension="${file##*.}" filedir=$(dirname "$file")