Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
c40bc2aa
Commit
c40bc2aa
authored
11 years ago
by
Tim Otten
Browse files
Options
Downloads
Plain Diff
Merge pull request #1811 from totten/4.4-setupsh-escape
setup.sh - Quote directory names (which may have spaces)
parents
826cd8dd
5e43f8f4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/setup.sh
+9
-8
9 additions, 8 deletions
bin/setup.sh
with
9 additions
and
8 deletions
bin/setup.sh
+
9
−
8
View file @
c40bc2aa
#!/usr/bin/env bash
set
-e
CALLEDPATH
=
`
dirname
$0
`
...
...
@@ -24,11 +25,11 @@ fi
# fetch command line arguments if available
if
[
!
-z
$1
]
;
then
SCHEMA
=
$1
;
fi
if
[
!
-z
$2
]
;
then
DBLOAD
=
$2
;
fi
if
[
!
-z
$3
]
;
then
DBNAME
=
$3
;
fi
if
[
!
-z
$4
]
;
then
DBUSER
=
$4
;
fi
if
[
!
-z
$5
]
;
then
DBPASS
=
$5
;
fi
if
[
!
-z
"
$1
"
]
;
then
SCHEMA
=
"
$1
"
;
fi
if
[
!
-z
"
$2
"
]
;
then
DBLOAD
=
"
$2
"
;
fi
if
[
!
-z
"
$3
"
]
;
then
DBNAME
=
"
$3
"
;
fi
if
[
!
-z
"
$4
"
]
;
then
DBUSER
=
"
$4
"
;
fi
if
[
!
-z
"
$5
"
]
;
then
DBPASS
=
"
$5
"
;
fi
# verify if we have at least DBNAME given
if
[
-z
$DBNAME
]
;
then
...
...
@@ -46,8 +47,8 @@ fi
# run code generator if it's there - which means it's
# checkout, not packaged code
if
[
-d
$CALLEDPATH
/../xml
]
;
then
cd
$CALLEDPATH
/../xml
if
[
-d
"
$CALLEDPATH
/../xml
"
]
;
then
cd
"
$CALLEDPATH
/../xml
"
"
$PHP5PATH
"
php GenCode.php
$SCHEMA
fi
...
...
@@ -59,7 +60,7 @@ else
PASSWDSECTION
=
"-p
$DBPASS
"
fi
cd
$CALLEDPATH
/../sql
cd
"
$CALLEDPATH
/../sql
"
echo
;
echo
"Dropping civicrm_* tables from database
$DBNAME
"
# mysqladmin -f -u $DBUSER $PASSWDSECTION $DBARGS drop $DBNAME
MYSQLCMD
=
"mysql -u
$DBUSER
$PASSWDSECTION
$DBARGS
$DBNAME
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment