Browse Source

sde-list-download: get rid of bashism to extract first char of filename

Signed-off-by: Alejandro Mery <amery@geeks.cl>
stable/0.2
Alejandro Mery 5 years ago
parent
commit
169cb9b9a0
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      bin/sde-list-download

+ 3
- 1
bin/sde-list-download

@ -85,7 +85,9 @@ $SDEROOT/bin/sde-list-pkg ${config:+-c $config} ${extenders:+-e} ${repositories:
fi fi
bz2file=$( echo "$gzfile" | sed -e 's,\.gpg$,,' -e 's,\.\(t\?\)\(gz\|Z\)$,.\1bz2,' -e 's,\.tar$,.tar.bz2,' ) bz2file=$( echo "$gzfile" | sed -e 's,\.gpg$,,' -e 's,\.\(t\?\)\(gz\|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 # source location
if [ -n "$want_location" ]; then if [ -n "$want_location" ]; then

Loading…
Cancel
Save