[cmd_import_tracks] Makes sure .import work dir is empty before and after

This commit is contained in:
ayakael 2018-05-18 19:52:29 -07:00
parent 0875112fc4
commit 299fe264ac
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -15,7 +15,9 @@
cmd_import_tracks() {
local GIT_DIR="${1}"; shift
local srcList=(${@})
rm -Rvf "${GIT_DIR}/.import" >/dev/null 2>&1
for src in ${srcList}; do
if iszip ${src}; then
_msg EXEC "Uncompressing ${src}"
@ -44,4 +46,5 @@ cmd_import_tracks() {
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Importation of ${import} failed, continuing"; continue; }
rm -R ${import} >/dev/null 2>&1
done
rm -Rvf "${GIT_DIR}/.import" >/dev/null 2>&1
}