Edit: I must not have tested this correctly.
Generally you don't need quotes when doing a variable assignment, just when dereferencing a variable. When making an assignment you don't need to put quotes around a variable being dereferenced, but since the dereferencing happens in a sub shell, quotes are needed around the ${zip_file}
part so that it's value is properly passed to basename. Quotes are NOT in fact needed around the entire line, because then it's back in the context of variable assignment, where quotes aren't needed as bash will do the right thing with passing the value from the subshell to the assignment line.
Thanks @janos for pointing this out. I'm not sure what I screwed up in testing the original line that took me down the path of excessive quotes. You are correct, the following is fine:
zip_dir=$PWD/$(basename "${zip_file}")
zip_dir
variable.@Name
so they are notified!zip_dir=$PWD/$(basename "${zip_file}")
add another line defining it again aszip_dir=${zip_dir%.*}
to remove the.zip
from the name. It is OK to have multiple lines defining things with the same variable as long as the last one is the one you want.