diff --git a/packages/public/install.sh b/packages/public/install.sh index 3dee3bd..28fa2da 100644 --- a/packages/public/install.sh +++ b/packages/public/install.sh @@ -40,7 +40,7 @@ fetch_directory_contents() { fi # Extract the response body (JSON content) - echo "$response" | head -n -1 + echo "$response" | sed '$d' } rewrite_path() { @@ -61,13 +61,13 @@ rewrite_imports() { local mode=$2 local case_option=$3 - sed -i 's|@/ui/components/\([^/]*\)/\1.vue|@/ui/components/\1.vue|g' "$final_path" + sed -i '' -e 's|@/ui/components/\([^/]*\)/\1.vue|@/ui/components/\1.vue|g' "$final_path" if [[ "$mode" == "inertia" ]]; then if [[ "$case_option" == "capitalize" ]]; then for folder in components composables theme utils types icons keys; do capitalized_folder=$(echo "$folder" | sed -E 's/^(.)/\U\1/') - sed -i "s|@/ui/$folder|@/UI/$capitalized_folder|g" "$final_path" + sed -i '' -e "s|@/ui/$folder|@/UI/$capitalized_folder|g" "$final_path" done fi fi @@ -164,7 +164,7 @@ download_files() { # Manage the job queue ((job_count++)) if ((job_count >= max_jobs)); then - wait -n # Wait for at least one job to finish before continuing + wait # Wait for all background jobs to finish before continuing ((job_count--)) fi done