File tree 2 files changed +25
-3
lines changed
2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -euo pipefail
3
3
4
- pandoc man/bombadil.1.md -s -t man
4
+ TEMP_FILE=/tmp/bombadil_man.md
5
+
6
+ while getopts v:d:i:o: option
7
+ do
8
+ case " ${option} "
9
+ in
10
+ v) VERSION=${OPTARG} ;;
11
+ d) DATE=${OPTARG} ;;
12
+ i) INPUT_PATH=${OPTARG} ;;
13
+ o) OUTPUT_PATH=${OPTARG} ;;
14
+ * ) echo " invalid flag"
15
+ esac
16
+ done
17
+
18
+ echo -e " Creating temporary file"
19
+ cp " $INPUT_PATH " " $TEMP_FILE "
20
+
21
+ echo -e " Setting version to $VERSION "
22
+ sed -i -e " s/{{version}}/$VERSION /g" " $TEMP_FILE "
23
+ echo -e " Setting date released to $DATE "
24
+ sed -i -e " s/{{date_released}}/$DATE /g" " $TEMP_FILE "
25
+
26
+ pandoc " $TEMP_FILE " -s -t man > " $OUTPUT_PATH "
Original file line number Diff line number Diff line change 1
- % BOMBADIL(1) bombadil 1.11.2
1
+ % BOMBADIL(1) bombadil {{version}}
2
2
% Paul Delafosse
3
- % Oct 2020
3
+ % {{date_released}}
4
4
5
5
# NAME
6
6
You can’t perform that action at this time.
0 commit comments