Skip to content

Commit

Permalink
use markdown files in scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Timm Knape committed Oct 4, 2019
1 parent 3b4f694 commit 82a3b3c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/hx-files.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash

FILEs=${*:-index.x}
if [ -f index.x ]; then
FILEs=${*:-index.x}
elif [ -f index.md ]; then
FILEs=${*:-index.md}
else
FILEs=$*
fi
grep '[dD]ef[(]file: ' $FILEs </dev/null | \
cut '-d(' -f2 | \
cut '-d)' -f1 | \
Expand Down
8 changes: 7 additions & 1 deletion src/hx-incs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash

FILES="${*:-index.x} "
if [ -f index.x ]; then
FILES="${*:-index.x} "
elif [ -f index.md ]; then
FILES="${*:-index.md} "
else
FILES="$* "
fi
NR=1
USED=""

Expand Down
8 changes: 7 additions & 1 deletion src/hx-srcs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash

FILES="${*:-index.x} "
if [ -f index.x ]; then
FILES="${*:-index.x} "
elif [ -f index.md ]; then
FILES="${*:-index.md} "
else
FILES="$* "
fi
USED=""

while [[ "x$FILES" != "x" ]]; do
Expand Down

0 comments on commit 82a3b3c

Please sign in to comment.