Skip to content

Commit

Permalink
Replaced "cut -d'...'" with "head ... tail ...".
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Spitzenpfeil committed Jul 12, 2015
1 parent e36fa97 commit 0223553
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ if [[ -z ${vmaj} || -z ${vmia} || -z ${vmib} ]]; then
exit 2
fi

vline=$(cut -d'
' -f5 youyue858d.ino | sed "s/^ \\* ${vers}$//" )
vline=$(head -n 5 youyue858d.ino | tail -n 1)

echo "vline: '$vline'"

if [[ -n ${vline} ]]; then
if [[ ${vline} != " * ${vers}" ]]; then
echo "invalid version in line 5!"
exit 2
fi
Expand Down

0 comments on commit 0223553

Please sign in to comment.