projects
/
auto-debuild.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45737df
)
only ask once for all overwritten files
author
Ralf Jung
<post@ralfj.de>
Thu, 31 Dec 2015 12:23:37 +0000
(13:23 +0100)
committer
Ralf Jung
<post@ralfj.de>
Thu, 31 Dec 2015 12:23:37 +0000
(13:23 +0100)
auto_debuild.py
patch
|
blob
|
history
diff --git
a/auto_debuild.py
b/auto_debuild.py
index 208010984fcc4da949235725420e0f2609598595..5de381e86b6f36d3497ea2e8cfef45c95eabeb5c 100755
(executable)
--- a/
auto_debuild.py
+++ b/
auto_debuild.py
@@
-383,10
+383,10
@@
if __name__ == "__main__":
deleteDebianFolder()
files = createDebianFiles(config)
# check if a file is overwritten
deleteDebianFolder()
files = createDebianFiles(config)
# check if a file is overwritten
- for file in files:
-
if os.path.exists(file)
:
-
if input("Do you want to overwrite %s (y/N)? " % file
).lower() != "y":
-
sys.exit(1)
+ overwritten_files = list(filter(lambda file: os.path.exists(file), files))
+
if overwritten_files
:
+
if input("Do you want to overwrite {} (y/N)? ".format(', '.join(overwritten_files))
).lower() != "y":
+ sys.exit(1)
# run compilation
buildDebianPackage(config)
# install files
# run compilation
buildDebianPackage(config)
# install files