mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-03 18:36:22 +00:00
14 lines
424 B
Bash
14 lines
424 B
Bash
#!/bin/bash
|
|
|
|
# Function to get user input for project name
|
|
get_project_name() {
|
|
while true; do
|
|
read -p "Enter project name (usually the domain name, like www-example-com): " HLPR_PROJECTNAME
|
|
if [[ "$HLPR_PROJECTNAME" =~ ^[a-zA-Z0-9-]+$ ]]; then
|
|
break
|
|
else
|
|
echo "Invalid project name. Please use only letters, numbers, and dashes. No spaces allowed."
|
|
fi
|
|
done
|
|
}
|