-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.sh
34 lines (24 loc) · 877 Bytes
/
create.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#This script can be called from everywhere
#It creates a project using this one as a template.
# Exit immediately if a command exits with a non-zero status
set -e
# Check if the project name is provided
if [ -z "$1" ]; then
echo "Usage: bash create.sh <projectname>"
exit 1
fi
# Define variables
REPO_URL="https://github.com/DavidPerezContreras/Vulkan_ENGINE_HELLO_WORLD_V1.git"
PROJECT_NAME="$1"
CLONE_DIR="Vulkan_ENGINE_HELLO_WORLD_V1"
# Clone the repository and rename it in one line
echo "Cloning repository from $REPO_URL..."
git clone "$REPO_URL" "$PROJECT_NAME"
# Change to the new project directory
cd "$PROJECT_NAME"
# Optional: Perform additional setup tasks here
# For example, if you have a setup script in the new repository
# echo "Running setup script..."
# bash setup.sh
echo "Project $PROJECT_NAME has been created successfully!"