added exception for -v in functions
This commit is contained in:
Minty Cube 2024-01-15 19:44:35 +05:00 committed by GitHub
parent 798ffbd7ac
commit ce8a464a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
ff
View File

@ -40,6 +40,9 @@ listObjects() {
unique_names=()
for arg in "$@"; do
if [[ "$arg" == "-v" ]]; then
continue
fi
name="${arg%%/*}"
if [ -n "$name" ]; then
if [[ ! " ${unique_names[*]} " =~ $name ]]; then
@ -60,6 +63,9 @@ listObjects() {
# Function to create directory structures and files
createObjects() {
for path in "$@"; do
if [[ "$path" == "-v" ]]; then
continue
fi
if [[ "$path" == */ ]]; then
mkdir -p "$path"
fi