summaryrefslogtreecommitdiff
path: root/tools/yelp-build.in
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2015-06-01 11:04:05 -0400
committerShaun McCance <shaunm@gnome.org>2015-06-01 11:04:05 -0400
commitb44a00287a3e59332a6e57cb39202bb57e1d9dea (patch)
treef8821c0d6598ba61d3a0642aee10df4737930b49 /tools/yelp-build.in
parent529e23b8bb5357f33fef143564b0dac64186a177 (diff)
downloadyelp-tools-b44a00287a3e59332a6e57cb39202bb57e1d9dea.tar.gz
yelp-build: Drop use of non-portable `expr substr`, #743911
Diffstat (limited to 'tools/yelp-build.in')
-rwxr-xr-xtools/yelp-build.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/yelp-build.in b/tools/yelp-build.in
index aeb8e56..acd42e8 100755
--- a/tools/yelp-build.in
+++ b/tools/yelp-build.in
@@ -423,14 +423,13 @@ yelp_html_mal2html () {
--stringparam mal.files.copy.js.dir "$yelp_js_dir" \
- "$html_tmp_infile") | sort | uniq | \
while read line; do
- use_internal_datadir=`expr substr "$line" 1 1`
- line=`expr substr "$line" 2 1000`
- line_src=`echo "$line" | cut -d' ' -f1`
- line_src=`echo "$line_src" | urldecode`
+ use_internal_datadir=$(echo "$line" | cut -c1)
+ line=$(echo "$line" | cut -c2-)
+ line_src=$(echo "$line" | cut -d' ' -f1 | urldecode)
if [ "x$use_internal_datadir" = "x+" ]; then
- line_dest="$html_out/$html_internal_datadir"`echo "$line" | cut -d' ' -f2`
+ line_dest="$html_out/$html_internal_datadir"$(echo "$line" | cut -d' ' -f2)
else
- line_dest="$html_out/"`echo "$line" | cut -d' ' -f2`
+ line_dest="$html_out/"$(echo "$line" | cut -d' ' -f2)
fi
if [ ! -f "$line_src" -a "x$html_paths" != "x" ]; then
line_src_rel=${line_src#"$(pwd)/"}