From 06c4071896ac7093c474026edfc7865264e7a2a5 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 30 Aug 2019 21:15:07 +0200 Subject: [PATCH] sde-list-download: get rid of bashism to extract first char of filename Signed-off-by: Alejandro Mery --- bin/sde-list-download | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/sde-list-download b/bin/sde-list-download index 7a1d37d..e6845fa 100755 --- a/bin/sde-list-download +++ b/bin/sde-list-download @@ -85,7 +85,9 @@ $SDEROOT/bin/sde-list-pkg ${config:+-c $config} ${extenders:+-e} ${repositories: fi bz2file=$( echo "$gzfile" | sed -e 's,\.gpg$,,' -e 's,\.\(t\?\)\(gz\|xz\|Z\)$,.\1bz2,' -e 's,\.tar$,.tar.bz2,' ) - output="${output:+$output\t}download/$mirror/${bz2file:0:1}/$bz2file" + x=$(echo "$bz2file" | cut -c1) + x="download/$mirror/$x/$bz2file" + output="${output:+$output\t}$x" # source location if [ -n "$want_location" ]; then