Skip to content

Commit

Permalink
Update install.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitauto-ai[bot] authored Sep 14, 2024
1 parent ec4c9ec commit 5229a25
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

echo "Enter the project name:"
read project_name

Check notice on line 4 in install.sh

View check run for this annotation

codefactor.io / CodeFactor

install.sh#L4

read without -r will mangle backslashes. (SC2162)

echo "Enter the default namespace:"
read namespace

Check notice on line 7 in install.sh

View check run for this annotation

codefactor.io / CodeFactor

install.sh#L7

read without -r will mangle backslashes. (SC2162)

echo "Enter the SonarCloud URL:"
read sonarcloud_url

Check notice on line 10 in install.sh

View check run for this annotation

codefactor.io / CodeFactor

install.sh#L10

read without -r will mangle backslashes. (SC2162)

echo "Enter the HealthChecks.io ID:"
read healthchecks_id

Check notice on line 13 in install.sh

View check run for this annotation

codefactor.io / CodeFactor

install.sh#L13

read without -r will mangle backslashes. (SC2162)

echo "Setting up project: $project_name"

# Update .wakatime and README.md
sed -i "s/TemplateProject/$project_name/g" .wakatime-project
sed -i "s/TemplateProject/$project_name/g" README.md

# Update composer.json
sed -i "s/TemplateNamespace/$namespace/g" composer.json

# Update Healthchecks.io badge
echo "Please create a HealthChecks.io account if needed."
sed -i "s/HealthChecksId/$healthchecks_id/g" README.md

# Update SonarCloud URL
sed -i "s|SonarCloudUrl|$sonarcloud_url|g" README.md

# Run composer install
echo "Running composer install..."
composer install

echo "Project setup complete."

# Additional PHP setup tasks
echo "Performing additional PHP setup tasks..."
# Add any additional setup commands here

echo "Setup finished successfully."

0 comments on commit 5229a25

Please sign in to comment.