From 19ffe8433b9ef75a0c6114bb7546a7396f5decb7 Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Sun, 20 Mar 2016 05:26:09 +0000 Subject: [PATCH] scripts/process-markdown: Fix usage of readlink Had used 'readlink -f' to canonicalize input and output paths. However, this fails when the output directory does not exist yet. Now uses 'readlink -m' instead to avoid this problem. --- src/scripts/process-markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/process-markdown b/src/scripts/process-markdown index 1880f7e9b1..6fe3cbe279 100755 --- a/src/scripts/process-markdown +++ b/src/scripts/process-markdown @@ -12,13 +12,13 @@ # output markdown. set -e - if [ $# != 2 ]; then +if [ $# != 2 ]; then echo "Usage: $0 " >&2 exit 1 fi -input=$(readlink -f $1) -output=$(readlink -f $2) +input=$(readlink -m $1) +output=$(readlink -m $2) [ -d $(dirname "$output") ] || mkdir -p "$(dirname $output)" cd $(dirname $output)