-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrc-process-pdf.sh
More file actions
executable file
·94 lines (80 loc) · 2.74 KB
/
Copy pathrc-process-pdf.sh
File metadata and controls
executable file
·94 lines (80 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
#
############################################################
# author: Paul Nong-Laolam
# title: software engineer
# company:
# ESPEC North America, Inc.
# 4141 Central Parkway
# Hudsonville, MI 49426
############################################################
# filename: process-pdf.sh
# update: March 2022
# July 2022: Added section on ES102 in the manual
############################################################
# function call to PDF documentation
process() {
# need to process LaTeX file twice in order
# to render the frontmatter contents
# preprocessing: first document processing
pdflatex ewc-man-v3_3.tex
# post-processing: second document processing ...
# to render correct format and Table of Contents
pdflatex ewc-man-v3_3.tex
}
############################################################
# file name declaration
F4T="./f4t.tex"
TYPHOON="./typhoon.tex"
F4="./f4.tex"
P300="./p300.tex"
SCP220="./scp220.tex"
ES102="./es102.tex"
############################################################
# archive the TeX files
TEX_FILE="file/chktexfile"
while IFS= read -r line; do
cp ./$line ./texfiles/.
done < "$TEX_FILE"
SRC_FILE="file/chksrcfile"
while IFS= read -r line; do
cp ./$line ./srcfiles/.
done < "$SRC_FILE"
############################################################
# Preliminary check for DPF processing requirements
# To ensure all files are ready for processing , the
# conditions must be met.
#
if [ ! -f "$F4T" ]; then
printf "\nError!\n"
printf "LaTeX file extraction has not be done for F4T. \nPerform that task first.\n"
read -p "Press ENTER to return to main option. " opt
bash rc-starter.sh
elif [ ! -f "$TYPHOON" ]; then
printf "\nError!\n"
printf "LaTeX file extraction has not be done for Typhoon. \nPerform that task first.\n"
read -p "Press ENTER to return to main option. " opt
bash rc-starter.sh
elif [ ! -f "$F4" ]; then
printf "\nError!\n"
printf "LaTeX file extraction has not be done for F4. \nPerform that task first.\n"
read -p "Press ENTER to return to main option. " opt
bash rc-starter.sh
elif [ ! -f "$P300" ]; then
printf "\nError!\n"
printf "LaTeX file extraction has not be done for P300. \nPerform that task first.\n"
read -p "Press ENTER to return to main option. " opt
bash rc-starter.sh
elif [ ! -f "$SCP220" ]; then
printf "\nError!\n"
printf "LaTeX file extraction has not be done for SCP220. \nPerform that task first.\n"
read -p "Press ENTER to return to main option. " opt
bash rc-starter.sh
elif [ ! -f "$ES102" ]; then
printf "\nError!\n"
printf "LaTeX file extraction has not be done for ES102. \nPerform that task first.\n"
read -p "Press ENTER to return to main option. " opt
bash rc-starter.sh
else
process
fi