From 0770403455a4e823d0dc05769c16271e755efaa6 Mon Sep 17 00:00:00 2001 From: Tom Scavo Date: Mon, 24 Apr 2017 10:17:54 -0400 Subject: [PATCH] Remove deprecated lib files --- install.sh | 2 - lib/command_paths.sh | 106 --------------------------------------- lib/compatible_mktemp.sh | 92 --------------------------------- 3 files changed, 200 deletions(-) delete mode 100755 lib/command_paths.sh delete mode 100755 lib/compatible_mktemp.sh diff --git a/install.sh b/install.sh index 388ba6b..a45c793 100755 --- a/install.sh +++ b/install.sh @@ -105,9 +105,7 @@ while read source_file; do exit $exit_status fi done <&2 - exit 1 -fi diff --git a/lib/compatible_mktemp.sh b/lib/compatible_mktemp.sh deleted file mode 100755 index 8026df7..0000000 --- a/lib/compatible_mktemp.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash - -####################################################################### -# Copyright 2013--2017 Internet2 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -####################################################################### - -####################################################################### -# This script is deprecated. Use core_lib.sh instead. -####################################################################### - -####################################################################### -# A simple compatibility wrapper around the mktemp command. -# -# Usage: -# $ make_temp_file [-d] [PREFIX] -# -# By default, creates a temporary file (use the -d option to -# create a directory). Takes an optional prefix argument that -# is used to construct the temporary file (or directory) name -# (defaults to some unspecified prefix if the argument is omitted). -# -# This script is compatible with Mac OS and GNU/Linux. -####################################################################### - -make_temp_file () { - local prefix - local _path_mktemp - local mktemp_arg - local temp_file - local return_code - - # process command-line options (if any) - local OPTARG - local OPTIND - local local_opts= - while getopts "d" opt; do - case $opt in - d) - local_opts=-d - ;; - \?) - echo "ERROR: $FUNCNAME: Unrecognized option: -$OPTARG" >&2 - return 1 - ;; - esac - done - - # determine the prefix - shift $((OPTIND-1)) - if [ $# -eq 0 ]; then - prefix="temp" - else - prefix="$1" - fi - - if [[ ${OSTYPE} = darwin* ]] ; then - _path_mktemp=/usr/bin/mktemp - # on Mac OS, mktemp takes a prefix - mktemp_arg="${prefix}" - elif [[ ${OSTYPE} = linux* ]] ; then - _path_mktemp=/bin/mktemp - # on Linux, mktemp takes a template - mktemp_arg="${prefix}.XXXXXXXX" - else - echo "ERROR: OS not supported: ${OSTYPE}" >&2 - return 1 - fi - - # create temporary file - temp_file=$( ${_path_mktemp} ${local_opts} -t ${mktemp_arg} ) - return_code=$? - if [ $return_code -ne 0 ] ; then - echo "ERROR: $FUNCNAME: failed to make temp file" >&2 - return $return_code - fi - - echo $temp_file - return 0 -} -