Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
system-design-primer
Commits
60202315
Unverified
Commit
60202315
authored
Jul 04, 2020
by
Sainadh Devireddy
Committed by
GitHub
Jul 03, 2020
Browse files
Check dependencies in Ebook gen script (#406)
parent
d57b3d1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
generate-epub.sh
View file @
60202315
#! /usr/bin/env sh
#! /usr/bin/env
ba
sh
generate_from_stdin
()
{
outfile
=
$1
...
...
@@ -34,6 +34,20 @@ generate () {
cat
$name
.md | generate_from_stdin
$name
.epub
$language
}
# Check if depencies exist
check_dependencies
()
{
for
dependency
in
"
${
dependencies
[@]
}
"
do
if
!
[
-x
"
$(
command
-v
$dependency
)
"
]
;
then
echo
"Error:
$dependency
is not installed."
>
&2
exit
1
fi
done
}
dependencies
=(
"pandoc"
)
check_dependencies
generate_with_solutions
generate README-ja ja
generate README-zh-Hans zh-Hans
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment