Skip to content

Commit

Permalink
Add http_tools.sh to the dependency list
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo committed Jan 14, 2017
1 parent 906201c commit 3c650ae
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
13 changes: 7 additions & 6 deletions bin/check_idp_error_urls.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#######################################################################
# Copyright 2015--2016 Internet2
# Copyright 2015--2017 Internet2
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -226,11 +226,6 @@ HELP_MSG
script_bin=${0%/*} # equivalent to dirname $0
script_name=${0##*/} # equivalent to basename $0

# library filenames (always list command_paths first)
LIB_FILENAMES="command_paths.sh
compatible_mktemp.sh
md_tools.sh"

# determine the source lib directory
if [ -z "$LIB_DIR" ]; then
echo "ERROR: $script_name requires env var LIB_DIR" >&2
Expand All @@ -241,6 +236,12 @@ if [ ! -d "$LIB_DIR" ]; then
exit 2
fi

# library filenames (always list command_paths first)
LIB_FILENAMES="command_paths.sh
compatible_mktemp.sh
http_tools.sh
md_tools.sh"

# source lib files
for lib_filename in $LIB_FILENAMES; do
lib_file="$LIB_DIR/$lib_filename"
Expand Down
35 changes: 18 additions & 17 deletions bin/list_local_idp_error_urls.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#######################################################################
# Copyright 2015--2016 Internet2
# Copyright 2015--2017 Internet2
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,11 +47,6 @@ HELP_MSG
script_name=${0##*/} # equivalent to basename $0
script_bin=${0%/*} # equivalent to dirname $0

# library filenames
COMMAND_PATHS_FILENAME=command_paths.sh
COMPATIBLE_MKTEMP_FILENAME=compatible_mktemp.sh
MD_TOOLS_FILENAME=md_tools.sh

#######################################################################
# Process command-line options and arguments
#######################################################################
Expand Down Expand Up @@ -157,19 +152,25 @@ if [ ! -d "$LIB_DIR" ]; then
fi
$verbose_mode && printf "$script_name using source lib directory: %s\n" "$LIB_DIR"

# source lib files (always source command_paths first)
for source_filename in $COMMAND_PATHS_FILENAME $COMPATIBLE_MKTEMP_FILENAME $MD_TOOLS_FILENAME; do
source_file="$LIB_DIR/$source_filename"
if [ ! -f "$source_file" ]; then
echo "ERROR: $script_name: file does not exist: $source_file" >&2
# library filenames (always list command_paths first)
LIB_FILENAMES="command_paths.sh
compatible_mktemp.sh
http_tools.sh
md_tools.sh"

# source lib files
for lib_filename in $LIB_FILENAMES; do
lib_file="$LIB_DIR/$lib_filename"
if [ ! -f "$lib_file" ]; then
echo "ERROR: $script_name: lib file does not exist: $lib_file" >&2
exit 2
fi
$verbose_mode && printf "$script_name sourcing lib file: %s\n" "$source_file"
source "$source_file" >&2
exit_status=$?
if [ $exit_status -ne 0 ]; then
echo "ERROR: $script_name failed to source script $source_file" >&2
exit $exit_status
$verbose_mode && printf "$script_name sourcing lib file: %s\n" "$lib_file"
source "$lib_file"
status_code=$?
if [ $status_code -ne 0 ]; then
echo "ERROR: $script_name failed to source lib file ($status_code) $lib_file" >&2
exit 2
fi
done

Expand Down

0 comments on commit 3c650ae

Please sign in to comment.