Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7574 from /issues/7563
Browse files Browse the repository at this point in the history
[1.8.x] Better found/not found messages for clarity
  • Loading branch information
NorseGaud authored Jul 1, 2019
2 parents bb55a39 + 78aa058 commit e5c6329
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/helpers/general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ function ensure-yum-packages() {
# || [[ -n "$testee" ]]; needed to see last line of deps file (https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line)
while read -r testee tester || [[ -n "$testee" ]]; do
if [[ ! -z $(eval $tester $testee) ]]; then
echo " - ${testee} ${COLOR_GREEN}found!${COLOR_NC}"
echo " - ${testee} ${COLOR_GREEN}ok${COLOR_NC}"
else
DEPS=$DEPS"${testee} "
echo " - ${testee} ${COLOR_RED}NOT${COLOR_NC} found."
echo " - ${testee} ${COLOR_RED}NOT${COLOR_NC} found!"
(( COUNT+=1 ))
fi
done < $DEPS_FILE
Expand Down Expand Up @@ -269,18 +269,18 @@ function ensure-brew-packages() {
# || [[ -n "$nmae" ]]; needed to see last line of deps file (https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line)
while read -r name path || [[ -n "$name" ]]; do
if [[ -f $path ]] || [[ -d $path ]]; then
echo " - ${name} ${COLOR_GREEN}found!${COLOR_NC}"
echo " - ${name} ${COLOR_GREEN}ok${COLOR_NC}"
continue
fi
# resolve conflict with homebrew glibtool and apple/gnu installs of libtool
if [[ "${testee}" == "/usr/local/bin/glibtool" ]]; then
if [ "${tester}" "/usr/local/bin/libtool" ]; then
echo " - ${name} ${COLOR_GREEN}found!${COLOR_NC}"
echo " - ${name} ${COLOR_GREEN}ok${COLOR_NC}"
continue
fi
fi
DEPS=$DEPS"${name} "
echo " - ${name} ${COLOR_RED}NOT${COLOR_NC} found."
echo " - ${name} ${COLOR_RED}NOT${COLOR_NC} found!"
(( COUNT+=1 ))
done < $DEPS_FILE
if [[ $COUNT > 0 ]]; then
Expand Down Expand Up @@ -348,10 +348,10 @@ function ensure-apt-packages() {
# || [[ -n "$testee" ]]; needed to see last line of deps file (https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line)
while read -r testee tester || [[ -n "$testee" ]]; do
if [[ ! -z $(eval $tester $testee 2>/dev/null) ]]; then
echo " - ${testee} ${COLOR_GREEN}found!${COLOR_NC}"
echo " - ${testee} ${COLOR_GREEN}ok${COLOR_NC}"
else
DEPS=$DEPS"${testee} "
echo " - ${testee} ${COLOR_RED}NOT${COLOR_NC} found."
echo " - ${testee} ${COLOR_RED}NOT${COLOR_NC} found!"
(( COUNT+=1 ))
fi
done < $DEPS_FILE
Expand Down

0 comments on commit e5c6329

Please sign in to comment.