Skip to content

Commit

Permalink
Merge pull request #26 from fosslight/develop
Browse files Browse the repository at this point in the history
Remove remained code related to  -a option
  • Loading branch information
soimkim authored Jan 5, 2022
2 parents adc73fd + 2366713 commit 8aaa528
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/fosslight_binary/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
Options:
-h\t\t\t\t Print help message
-v\t\t\t\t Print FOSSLight Binary Scanner version
-a <target_architecture>\t Target Architecture(x86-64, ARM, MIPS, Mach-O, and etc.)
-o <output_path>\t\t Output path
\t\t\t\t (If you want to generate the specific file name, add the output path with file name.)
-f <format>\t\t\t Output file format (excel, csv, opossum)
Expand Down
31 changes: 17 additions & 14 deletions src/fosslight_binary/binary_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,23 @@ def main():
format = ""
db_url = ""

opts, args = getopt.getopt(argv, 'hvp:a:o:f:d:')
for opt, arg in opts:
if opt == "-h":
print_help_msg()
elif opt == "-v":
print_package_version(_PKG_NAME, "FOSSLight Binary Scanner Version:")
elif opt == "-p":
path_to_find_bin = arg
elif opt == "-o":
output_dir = arg
elif opt == "-f":
format = arg
elif opt == "-d":
db_url = arg
try:
opts, args = getopt.getopt(argv, 'hvp:o:f:d:')
for opt, arg in opts:
if opt == "-h":
print_help_msg()
elif opt == "-v":
print_package_version(_PKG_NAME, "FOSSLight Binary Scanner Version:")
elif opt == "-p":
path_to_find_bin = arg
elif opt == "-o":
output_dir = arg
elif opt == "-f":
format = arg
elif opt == "-d":
db_url = arg
except Exception:
print_help_msg()

_windows = platform.system() == "Windows"
if path_to_find_bin == "":
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ deps =

commands =
fosslight_bin -h
fosslight_bin -p tests -o test_result/result.csv -f csv -a x86_64
fosslight_bin -p tests -o test_result/result.csv -f csv
ls test_result/
cat test_result/result.csv
fosslight_bin -p tests -o test_result/result.json -f opossum -a x86_64
fosslight_bin -p tests -o test_result/result.json -f opossum
pytest -v --flake8
pyinstaller --onefile cli.py -n cli --additional-hooks-dir=hooks
{toxinidir}/dist/cli -p tests -o test_result_cli
Expand Down

0 comments on commit 8aaa528

Please sign in to comment.