Skip to content

Commit

Permalink
drop: is_script_listed() - no longer in use
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Aug 9, 2023
1 parent bcdb4c7 commit 78322cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
13 changes: 0 additions & 13 deletions src/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,6 @@ get_scripts_for_scanning () {
[[ ${UNIT_TESTS:-1} -eq 0 ]] && eval echo "\${${output}[@]@Q}"
}

# Function to check whether the input param is on the list of shell scripts
# $1 - <string> absolute path to a file
# $@ - <array of strings> list of strings to compare with
# $? - return value - 0 on success
is_script_listed () {
[[ $# -le 1 ]] && return 1
local file="$1"
shift
local scripts=("$@")

[[ "${scripts[*]}" =~ ${file} ]] && return 0 || return 2
}

# Function to check whether the given file has the .{,a,ba,da,k}sh and .bats extension
# https://stackoverflow.com/a/6926061
# $1 - <string> absolute path to a file
Expand Down
27 changes: 0 additions & 27 deletions test/is_script_listed.bats

This file was deleted.

0 comments on commit 78322cb

Please sign in to comment.