dam/src/iszip
ayakael 35fbaad084
[cmd_import] Updated documentation
[cmd_import_tracks] Rewrote function to accomodate fragmented files
[cmd_import_images] Renamed cmd_import_cueripper to cmd_import_images in preparation for rewri
te of import_images functions
[gen_cue] Adjusted variable names to fit actual output of print_meta functions
[gen_image] Removed error messages in favor of exit codes
[gen_mtag] Rewrote to accomodate multiple track files.
[import_dir] Added to deal with importing directories after consolidation by import_track
[import_cueripper] Renamed to import_images in preparation for rewrite
[import_track] Added to deal with consolidation of disparate track files
[import_tracks] Removed in favor of import_track and import_dir functions
[iszip] Added as an easy way to see if zip file
[print_meta_track] Renamed function
2018-05-18 12:37:03 -07:00

21 lines
397 B
Bash

#!/bin/bash
# doc iszip {
#
# DESCRIPTION
# iszip - Returns true if any file present is a zip file.
#
# USAGE
# iszip <files>
#
# }
iszip() {
local fileList=("${@}")
for file in ${fileList[@]}; do
local FILE_EXT="$(echo "${file}" | sed 's|.*\.||')"
[[ "${FILE_EXT}" == "zip" ]] && local ZIP=0 || local ZIP=1
done
[[ ${ZIP} -eq 0 ]] && return 0 || return 1
}