Skip to content

Commit 7ebd9e4

Browse files
author
meihuisu
committed
add -f or --force to overcome the setup's 'no' option
1 parent 7f55bec commit 7ebd9e4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ucvm_setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
# User defined variables.
3030
all_flag = False
31+
force_flag = False
3132
dynamic_flag = True
3233
restart_flag = False
3334
use_iobuf = False
@@ -693,7 +694,7 @@ def _addPROJ_LIB_python() :
693694
# Read in the possible arguments
694695
#
695696
try:
696-
opts, args = getopt.getopt(sys.argv[1:], "asdhrp:", ["all", "static", "dynamic", "help", "restart","path"])
697+
opts, args = getopt.getopt(sys.argv[1:], "asdhrp:", ["all", "static", "dynamic", "help", "restart", "force", "path"])
697698
except getopt.GetoptError as err:
698699
print(str(err))
699700
usage()
@@ -703,6 +704,9 @@ def _addPROJ_LIB_python() :
703704
if o in ('-r', '--restart'):
704705
restart_flag = True
705706
print("Restart Flag: True")
707+
if o in ('-f', '--force'):
708+
force_flag = True
709+
print("Force Flag: True")
706710
elif o in ('-a', '--all'):
707711
all_flag = True
708712
print("All Flag: True")
@@ -865,7 +869,7 @@ def _addPROJ_LIB_python() :
865869
modelsToInstall.append(model)
866870
continue
867871

868-
if config_data["models"][model]["Ask"] != "no":
872+
if config_data["models"][model]["Ask"] != "no" or force_flag :
869873
print("\nWould you like to install " + model + "?")
870874
if sys.version_info.major >= (3) :
871875
dlinstmodel = input("Enter yes or no: ")

0 commit comments

Comments
 (0)