mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
scripts/common.sh: Add first_word() helper
This commit is contained in:
parent
248bc387cd
commit
91ee0ed4ef
@ -226,7 +226,16 @@ function circleci_step_selected
|
||||
{
|
||||
local selected_steps="$1"
|
||||
local step="$2"
|
||||
(( $# == 2 )) || assertFail
|
||||
[[ $step != *" "* ]] || assertFail "Step names must not contain spaces."
|
||||
|
||||
[[ " $selected_steps " == *" $step "* ]] || return 1
|
||||
}
|
||||
|
||||
function first_word
|
||||
{
|
||||
local words="$1"
|
||||
(( $# == 1 )) || assertFail
|
||||
|
||||
echo "$words" | cut -d " " -f 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user