mirror of
https://github.com/FlightControl-Master/MOOSE_Demos.git
synced 2025-08-15 10:37:47 +00:00
Switch to named parameters
This commit is contained in:
parent
8f6c69ee3c
commit
e90c6d5f1d
@ -106,11 +106,13 @@ if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='Blabla.')
|
||||
|
||||
# Add argument for Moose path.
|
||||
parser.add_argument('MoosePath', metavar='moose', type=str, help='path to Moose.lua file', default="./")
|
||||
parser.add_argument('--MoosePath', metavar='moose', type=str, help='path to Moose.lua file', default="./")
|
||||
|
||||
# Add argument for Moose path.
|
||||
parser.add_argument('MissionPath', metavar='missions', type=str, help='path to missions', default="./")
|
||||
parser.add_argument('--MissionPath', metavar='missions', type=str, help='path to missions', default="./")
|
||||
|
||||
#
|
||||
parser.add_argument('--UpdateMoose', action='store_true')
|
||||
|
||||
# Execute the parse_args() method
|
||||
args = parser.parse_args()
|
||||
@ -121,6 +123,12 @@ if __name__ == '__main__':
|
||||
# Moose.lua file
|
||||
MooseLua=Moose/"Moose_.lua"
|
||||
|
||||
if args.UpdateMoose:
|
||||
print("Will update all Moose_.lua files")
|
||||
|
||||
print(args.MoosePath)
|
||||
print(args.MissionPath)
|
||||
|
||||
# Check that Moose.lua exists
|
||||
if MooseLua.exists():
|
||||
print("Moose_.lua exists")
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
python ./UpdateMoose.py ../../MOOSE_INCLUDE/Moose_Include_Static/ ../
|
||||
python ./UpdateMoose.py --MoosePath ../../MOOSE_INCLUDE/Moose_Include_Static/ --MissionPath ../ --UpdateMoose
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user