Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
37866d7a
Commit
37866d7a
authored
Jan 22, 2013
by
Christos Stavrakakis
Browse files
Add function for creating temp directory
parent
e04d1761
Changes
1
Hide whitespace changes
Inline
Side-by-side
devflow/autopkg.py
View file @
37866d7a
...
...
@@ -160,7 +160,7 @@ def main():
# Clone the repo
repo_dir
=
options
.
repo_dir
if
not
repo_dir
:
repo_dir
=
mktemp
(
"-d"
,
"/tmp/devflow-build-repo-XXX"
).
stdout
.
strip
(
)
repo_dir
=
create_temp_directory
(
"df-repo"
)
print_green
(
"Created temporary directory '%s' for the cloned repo."
%
repo_dir
)
...
...
@@ -256,7 +256,7 @@ def main():
# Create debian branches
build_dir
=
options
.
build_dir
if
not
options
.
build_dir
:
build_dir
=
mktemp
(
"-d"
,
"/tmp/devflow-build-XXX"
).
stdout
.
strip
(
)
build_dir
=
create_temp_directory
(
"df-build"
)
print_green
(
"Created directory '%s' to store the .deb files."
%
build_dir
)
...
...
@@ -307,5 +307,10 @@ def get_packages_to_build(config_file):
return
l
def
create_temp_directory
(
suffix
):
create_dir_cmd
=
mktemp
(
"-d"
,
"/tmp/"
+
suffix
+
"-XXXXX"
)
return
create_dir_cmd
.
stdout
.
strip
()
if
__name__
==
"__main__"
:
sys
.
exit
(
main
())
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