From 8a73450ff09538f166327ce4afba3b927dc73a70 Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 4 Feb 2021 19:04:12 +0000 Subject: shellspec: simplify sed call FossilOrigin-Name: 068344d7b0d20d8e1fa6a79ac2d8e7cb14d9e70ac0260545207a8714dedf0371 --- spec/02_src_spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/02_src_spec.sh b/spec/02_src_spec.sh index 64eaa2f..4685ec1 100644 --- a/spec/02_src_spec.sh +++ b/spec/02_src_spec.sh @@ -10,7 +10,7 @@ Describe 'Main toolchain' Describe 'cpt' Describe '--version' - VERSION=$(grep VERSION config.mk | sed 's/.* //g') + VERSION=$(sed -n '/VERSION/s/.* //gp' config.mk) It 'outputs cpt version' When run script src/cpt --version The stderr should eq "-> Carbs Packaging Tools $VERSION" -- cgit v1.2.3