Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
1d2a7dcf
Commit
1d2a7dcf
authored
Jul 17, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to use coffee instead of js
parent
600e512f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
debomatic-webui/scripts/install/create-user-config.py
debomatic-webui/scripts/install/create-user-config.py
+7
-9
No files found.
debomatic-webui/scripts/install/create-user-config.py
View file @
1d2a7dcf
...
@@ -6,21 +6,20 @@ import os
...
@@ -6,21 +6,20 @@ import os
base_path
=
os
.
environ
[
'SCRIPTS_DIR'
]
base_path
=
os
.
environ
[
'SCRIPTS_DIR'
]
global_config_file
=
os
.
path
.
join
(
base_path
,
'../lib/config.
js
'
)
global_config_file
=
os
.
path
.
join
(
base_path
,
'../lib/config.
coffee
'
)
user_config_file
=
os
.
path
.
join
(
base_path
,
'../user.config.
js
'
)
user_config_file
=
os
.
path
.
join
(
base_path
,
'../user.config.
coffee
'
)
if
os
.
path
.
isfile
(
user_config_file
):
if
os
.
path
.
isfile
(
user_config_file
):
print
(
"A config user file already exists. Skipping creation."
)
print
(
"A config user file already exists. Skipping creation."
)
exit
()
exit
()
export_header
=
"""
export_header
=
"""
/*
###
*
debomatic-webui user configuration
debomatic-webui user configuration
*/
###
"""
"""
export_config
=
[
export_header
]
export_config
=
[]
with
open
(
global_config_file
)
as
fd
:
with
open
(
global_config_file
)
as
fd
:
start
=
False
start
=
False
...
@@ -33,11 +32,10 @@ with open(global_config_file) as fd:
...
@@ -33,11 +32,10 @@ with open(global_config_file) as fd:
if
start
:
if
start
:
export_config
.
append
(
line
)
export_config
.
append
(
line
)
export_config
.
append
(
'
//
DO NOT EDIT THIS LINE:
\
n
'
)
export_config
.
append
(
'
#
DO NOT EDIT THIS LINE:
\
n
'
)
export_config
.
append
(
'module.exports = config
\
n
'
)
export_config
.
append
(
'module.exports = config
\
n
'
)
print
(
"Creating user configuration ..."
)
print
(
"Creating user configuration ..."
)
with
open
(
user_config_file
,
'w'
)
as
fd
:
with
open
(
user_config_file
,
'w'
)
as
fd
:
fd
.
write
(
export_header
)
fd
.
write
(
''
.
join
(
export_config
))
fd
.
write
(
''
.
join
(
export_config
))
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