Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
01ab896d
Commit
01ab896d
authored
Nov 15, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Little refactor of config generation
parent
cd31fd3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
gargantext.template.ini
tools/conf/gargantext.template.ini
+0
-0
mkconf.sh
tools/mkconf.sh
+9
-5
No files found.
tools/gargantext.template.ini
→
tools/
conf/
gargantext.template.ini
View file @
01ab896d
File moved
tools/mkconf.sh
View file @
01ab896d
...
...
@@ -18,7 +18,7 @@ TARGET="${1:-dev}"
[
-z
"
$GARGANTEXT_CONF
"
]
&&
GARGANTEXT_CONF
=
gargantext.ini
# Configuration template path
TEMPLATE
=
tools/gargantext.template.ini
TEMPLATE
=
tools/
conf/
gargantext.template.ini
# Check for configuration file existence
if
[
-f
"
$GARGANTEXT_CONF
"
-a
-z
"
$FORCE
"
]
;
then
...
...
@@ -66,11 +66,15 @@ while :; do
fi
done
escape_ini
()
{
echo
-n
"
$1
"
|
sed
-e
's/[\/&\"]/\\&/g'
}
# Escape variables
SECRET_KEY
=
$(
e
cho
-n
"
$SECRET_KEY
"
|
sed
-e
's/[\/&\"]/\\&/g'
)
DB_NAME
=
$(
e
cho
-n
"
$DB_NAME
"
|
sed
-e
's/[\/&\"]/\\&/g'
)
DB_USER
=
$(
e
cho
-n
"
$DB_USER
"
|
sed
-e
's/[\/&\"]/\\&/g'
)
DB_PASS
=
$(
e
cho
-n
"
$DB_PASS
"
|
sed
-e
's/[\/&\"]/\\&/g'
)
SECRET_KEY
=
$(
e
scape_ini
"
$SECRET_KEY
"
)
DB_NAME
=
$(
e
scape_ini
"
$DB_NAME
"
)
DB_USER
=
$(
e
scape_ini
"
$DB_USER
"
)
DB_PASS
=
$(
e
scape_ini
"
$DB_PASS
"
)
echo
"Generate configuration file from
$TEMPLATE
..."
sed
-E
-e
"s/[{]DEBUG[}]/
$DEBUG
/g"
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment