Skip to content
Snippets Groups Projects
Commit a7a1a49e authored by Kevin Daudt's avatar Kevin Daudt :computer:
Browse files

testing/py3-litex: 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.
parent a17024e1
No related branches found
No related tags found
1 merge request!59674testing/py3-litex(-hub-modules): avoid global exec
...@@ -74,13 +74,13 @@ _cores_litex_hub=" ...@@ -74,13 +74,13 @@ _cores_litex_hub="
_cores="$_cores_enjoy_digital $_cores_litex_hub" _cores="$_cores_enjoy_digital $_cores_litex_hub"
for _core_name in $_cores_enjoy_digital; do for _core_name in $_cores_enjoy_digital; do
_core=$(echo "$_core_name" | cut -d : -f 1) _core=${_core_name%:*}
subpackages="$subpackages py3-lite$_core:_subpkg_core" subpackages="$subpackages py3-lite$_core:_subpkg_core"
source="$source py3-lite$_core-$pkgver.tar.gz::https://github.com/enjoy-digital/lite$_core/archive/refs/tags/$pkgver.tar.gz" source="$source py3-lite$_core-$pkgver.tar.gz::https://github.com/enjoy-digital/lite$_core/archive/refs/tags/$pkgver.tar.gz"
done done
for _core_name in $_cores_litex_hub; do for _core_name in $_cores_litex_hub; do
_core=$(echo "$_core_name" | cut -d : -f 1) _core=${_core_name%:*}
subpackages="$subpackages py3-lite$_core:_subpkg_core" subpackages="$subpackages py3-lite$_core:_subpkg_core"
source="$source py3-lite$_core-$pkgver.tar.gz::https://github.com/litex-hub/lite$_core/archive/refs/tags/$pkgver.tar.gz" source="$source py3-lite$_core-$pkgver.tar.gz::https://github.com/litex-hub/lite$_core/archive/refs/tags/$pkgver.tar.gz"
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment