summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2015-05-14 13:33:32 -0400
committerGedare Bloom <gedare@rtems.org>2015-05-14 13:33:32 -0400
commit62bfc7999f62ff698ec24477b424bbb9d68aa35b (patch)
tree6bf7b32850ecd03affe1494c9320a8624945845d
parent0dd40d066c16981ed4a6ba34e76616f6337a54a5 (diff)
release.sh: refactor checks for executable dependencies
-rwxr-xr-xrelease-helpers/release.sh26
1 files changed, 12 insertions, 14 deletions
diff --git a/release-helpers/release.sh b/release-helpers/release.sh
index f760cc5..0b473cb 100755
--- a/release-helpers/release.sh
+++ b/release-helpers/release.sh
@@ -77,6 +77,12 @@ vecho()
fi
}
+check_dep()
+{
+ type $1 > /dev/null 2>&1
+ check_error $? "$1 is not in your PATH"
+}
+
# Set up variables which control the scripts behavior
verbose=yes
VERSION=NOT_SET
@@ -99,14 +105,9 @@ done
test -r aclocal/version.m4
check_error $? "Not at the top of an RTEMS tree"
-type sb-bootstrap >/dev/null 2>&1
-check_error $? "sb-bootstrap is not in your PATH"
-
-type doxygen > /dev/null 2>&1
-check_error $? "doxygen is not in your PATH"
-
-type mscgen > /dev/null 2>&1
-check_error $? "mscgen is not in your PATH"
+check_dep sb-bootstrap
+check_dep doxygen
+check_dep mscgen
if [ ${bump_dot_release} = "no" -a ${bump_major_version} = "no" ] ; then
fatal "Must select an action: bump major or dot release"
@@ -168,10 +169,8 @@ if [ ${bump_dot_release} = "yes" ] ; then
# We need to have access to various texi tools to build documentation
# For CentOS, the RPMs are texinfo-tex and texi2html
- type texi2dvi >/dev/null 2>&1
- check_error $? "texi2dvi is not in your PATH"
- type texi2pdf >/dev/null 2>&1
- check_error $? "texi2pdf is not in your PATH"
+ check_dep texi2dvi
+ check_dep texi2pdf
# main tool varies based on texinfo version
type texi2any >/dev/null 2>&1
ta=$?
@@ -181,8 +180,7 @@ if [ ${bump_dot_release} = "yes" ] ; then
fi
# We need to have access to SPARC tools to build Doxygen.
- type sparc-rtems${MAJOR}-gcc >/dev/null 2>&1
- check_error $? "sparc-rtems${MAJOR}-gcc is not in your PATH"
+ check_dep sparc-rtems${MAJOR}-gcc
fi
##### END OF ERROR CHECKING