-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmd2adoc.sh
More file actions
executable file
·31 lines (23 loc) · 964 Bytes
/
Copy pathmd2adoc.sh
File metadata and controls
executable file
·31 lines (23 loc) · 964 Bytes
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
#!/usr/bin/env bash
# Bash strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -o nounset # Using an undefined variable is fatal
set -o errexit # A sub-process/shell returning non-zero is fatal
# set -o pipefail # If a pipeline step fails, the pipelines RC is the RC of the failed step
# set -o xtrace # Output a complete trace of all bash actions; uncomment for debugging
# IFS=$'\n\t' # Only split strings on newlines & tabs, not spaces.
source ./includes.sh
function init() {
# readonly script_path="${BASH_SOURCE[0]:-$0}"
# readonly script_dir="$(dirname "$(readlink -f "$script_path")")"
# readonly script_name="$(basename "$script_path")"
readonly src_path="$1"
readonly src_folder="$(dirname "$src_path")"
readonly src_filename="$(basename "$src_path")"
readonly src_name="${src_filename%.*}"
}
if [[ $# == 0 ]]; then
msg "Missing parameter: Markdown FILE."
# usage
fi
init "$@"
kramdoc "$src_path"