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:
39c140d
)
control "waitAfterConfig" via command-line switch
author
Ralf Jung
<post@ralfj.de>
Mon, 2 Sep 2013 16:11:46 +0000
(18:11 +0200)
committer
Ralf Jung
<post@ralfj.de>
Mon, 2 Sep 2013 16:11:46 +0000
(18:11 +0200)
auto_debuild.py
patch
|
blob
|
history
diff --git
a/auto_debuild.py
b/auto_debuild.py
index 24720b9d683336185e9d832a7ed40a2e53c9b0b3..8dfdef58622bc0aef33379770ac2727c8bfcee4b 100755
(executable)
--- a/
auto_debuild.py
+++ b/
auto_debuild.py
@@
-16,7
+16,7
@@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-import os, shutil, stat, time, subprocess, sys, shlex, tempfile
+import os, shutil, stat, time, subprocess, sys, shlex, tempfile
, argparse
from collections import OrderedDict
# a dict with some useful additional getters which can convert types and handle one-element lists like their single member
from collections import OrderedDict
# a dict with some useful additional getters which can convert types and handle one-element lists like their single member
@@
-386,8
+386,15
@@
def buildDebianPackage(config):
# if we are called directly as script
if __name__ == "__main__":
try:
# if we are called directly as script
if __name__ == "__main__":
try:
+ # read command-line arguments
+ parser = argparse.ArgumentParser(description='Automatic Generation of Debian Packages')
+ parser.add_argument("-w", "--wait-after-config",
+ action="store_true", dest="wait_after_config",
+ help="Wait for user confirmation after configuration is finished")
+ args = parser.parse_args()
# get config
config = loadConfigFile('auto-debuild.conf')
# get config
config = loadConfigFile('auto-debuild.conf')
+ config['waitAfterConfig'] = args.wait_after_config
# generate debian files
if os.path.exists('debian') or os.path.islink('debian'):
if raw_input("A debian folder already exists, do you want to remove it and whatever it links to (y/N)? ").lower() != "y":
# generate debian files
if os.path.exists('debian') or os.path.islink('debian'):
if raw_input("A debian folder already exists, do you want to remove it and whatever it links to (y/N)? ").lower() != "y":