aboutsummaryrefslogtreecommitdiff
path: root/release/scripts
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-05-05 23:36:46 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-05-05 23:36:46 +0000
commit4c9e857efad511aed51e99cf44dfd9ac783df546 (patch)
tree1b54f84241eb64591b8b1c8f473c829e4ce35f49 /release/scripts
parentaa8426befc48e883a3b2a9d448cc80cf618e9a12 (diff)
downloadsrc-4c9e857efad511aed51e99cf44dfd9ac783df546.tar.gz
src-4c9e857efad511aed51e99cf44dfd9ac783df546.zip
Use 'return' instead of 'exit' in main(), since the script exits
with the last returned exit code. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=265406
Diffstat (limited to 'release/scripts')
-rwxr-xr-xrelease/scripts/relnotes-search.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/relnotes-search.sh b/release/scripts/relnotes-search.sh
index 42d67fc3cb56..a9a931a84c10 100755
--- a/release/scripts/relnotes-search.sh
+++ b/release/scripts/relnotes-search.sh
@@ -56,7 +56,7 @@ main() {
if [ -e "${where}" ]; then
echo "Log file already exists:"
echo " (${where})"
- exit 2
+ return 2
fi
;;
r)
@@ -64,7 +64,7 @@ main() {
c=$(echo -n ${rev} | tr -d '0-9' | wc -c)
if [ ${c} -ne 0 ]; then
echo "Revision number must be numeric."
- exit 2
+ return 2
fi
# Since the last specified revision is
# specified, mangle the variable to
@@ -101,25 +101,25 @@ main() {
# Did we find svn?
if [ -z "${svn}" ]; then
echo "svn(1) binary not found."
- exit 2
+ return 2
fi
# Is more than one path specified? (This should never
# be triggered, because the argument count is checked
# above, but better safe than sorry.)
if [ $# -gt 1 ]; then
echo "Cannot specify more than one working path."
- exit 2
+ return 2
fi
# Does the directory exist?
if [ ! -d "${1}" ]; then
echo "Specified path (${1}) is not a directory."
- exit 2
+ return 2
fi
# Is it a subversion repository checkout?
${svn} info ${1} >/dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo "Cannot determine svn repository information for ${1}"
- exit 2
+ return 2
fi
# All tests passed. Let's see what can possibly go wrong