-
Notifications
You must be signed in to change notification settings - Fork 0
/
createSFProject.sh
executable file
·64 lines (60 loc) · 1.29 KB
/
createSFProject.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
PROJECT_NAME=""
GIT_USERNAME=""
GIT_EMAIL=""
PHP_VERSION=""
MARIADB_VERSION=""
POSTGRES_VERSION=""
MYSQL_VERSION=""
FIREBIRD_VERSION=""
DB_TYPE=""
SF_VERSION=""
for i in "$@"
do
case $i in
-project-name=*)
PROJECT_NAME="${i#*=}"
shift
;;
-git-username=*)
GIT_USERNAME="${i#*=}"
shift
;;
-git-email=*)
GIT_EMAIL="${i#*=}"
shift
;;
-php-version=*)
PHP_VERSION="${i#*=}"
shift
;;
-mariadb-version=*)
MARIADB_VERSION="${i#*=}"
shift
;;
-postgres-version=*)
POSTGRES_VERSION="${i#*=}"
shift
;;
-mysql-version=*)
MYSQL_VERSION="${i#*=}"
shift
;;
-firebird-version=*)
FIREBIRD_VERSION="${i#*=}"
shift
;;
-db-type=*)
DB_TYPE="${i#*=}"
shift
;;
-symfony-version=*)
SF_VERSION="${i#*=}"
shift
;;
*)
;;
esac
done
SCRIPT_DIR=$(dirname "$(realpath "$0")")
php "$SCRIPT_DIR/project-symfony.php" --project-name="$PROJECT_NAME" --git-username="$GIT_USERNAME" --git-email="$GIT_EMAIL" --php-version="$PHP_VERSION" --mariadb-version="$MARIADB_VERSION" --postgres-version="$POSTGRES_VERSION" --mysql-version="$MYSQL_VERSION" --firebird-version="$FIREBIRD_VERSION" --db-type="$DB_TYPE" --symfony-version="$SF_VERSION" --output-dir="$PWD" --is-sh="true"