fix: replace ((var++)) with var=$((var+1)) for compatibility
This commit is contained in:
@@ -445,7 +445,7 @@ link_model() {
|
||||
# Create symlink
|
||||
ln -s "$source_file" "$link_path"
|
||||
print_detail "${LINK} Linked: ${DIM}${filename}${RESET}"
|
||||
((linked_count++))
|
||||
linked_count=$((linked_count+1))
|
||||
fi
|
||||
done <<< "$model_files"
|
||||
|
||||
@@ -485,8 +485,10 @@ process_category() {
|
||||
local succeeded=0
|
||||
local failed=0
|
||||
|
||||
echo "DEBUG: About to enter while loop, models_data first line: $(echo \"$models_data\" | head -n1)" >&2
|
||||
while IFS='|' read -r repo_id description size_gb essential model_type filename; do
|
||||
((current++))
|
||||
echo "DEBUG: Entered while loop iteration" >&2
|
||||
current=$((current+1))
|
||||
|
||||
echo "" >&2
|
||||
echo "DEBUG: Processing model $current/$total_models: $repo_id (type: $model_type)" >&2
|
||||
@@ -513,9 +515,9 @@ process_category() {
|
||||
fi
|
||||
|
||||
if $success; then
|
||||
((succeeded++))
|
||||
succeeded=$((succeeded+1))
|
||||
else
|
||||
((failed++))
|
||||
failed=$((failed+1))
|
||||
fi
|
||||
|
||||
show_progress "$current" "$total_models"
|
||||
@@ -599,7 +601,7 @@ main() {
|
||||
process_category "$category" "$category_display"
|
||||
|
||||
# Update counters (this is simplified, you'd need to track actual numbers)
|
||||
((total_succeeded++))
|
||||
total_succeeded=$((total_succeeded+1))
|
||||
done <<< "$categories"
|
||||
|
||||
# Display summary
|
||||
|
||||
Reference in New Issue
Block a user