mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/py3-litex-hub-modules: avoid global exec
Shelling out in the global scope is expensive and in this case not
necessary, change the `cut` invocation to parameter substitution.
`${foo%:*}` cuts of the `:` and everything that comes after it, which is
the same as `| cut -d : -f 1` does.
`${foo#*:}` cuts of everything until and including the `:`, which is
the same as `| cut -d : -f 2` does.
This commit is contained in:
parent
a7a1a49e98
commit
80435b3f3e
@ -73,11 +73,12 @@ options="!check"
|
||||
options="$options !strip"
|
||||
|
||||
_repo_name() {
|
||||
echo $1 | cut -d : -f 1
|
||||
echo ${1%%:*}
|
||||
}
|
||||
|
||||
_pkgver() {
|
||||
echo $1 | cut -d : -f 2
|
||||
a=${1%:*}
|
||||
echo ${a#*:}
|
||||
}
|
||||
|
||||
_version_by_name() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user