From 516507cd62c289076faecbd7dd357428b5555df4 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 28 Jun 2024 14:54:54 -0500 Subject: [PATCH] Re-add deprecated scripts, drop shebang from cli modules (#187) This is a follow-up change to re-add deprecated scripts so we don't break any existing use of those scripts while folks migrate to better ways to invoke them. Additionally, we can drop the shebangs and executable permissions from the CLI modules that were renamed in the previous commit. --- scripts/rosdistro | 11 +++++++++++ scripts/rosdistro_build_cache | 11 +++++++++++ scripts/rosdistro_convert | 11 +++++++++++ scripts/rosdistro_freeze_source | 11 +++++++++++ scripts/rosdistro_generate_cache | 11 +++++++++++ scripts/rosdistro_migrate_to_rep_141 | 11 +++++++++++ scripts/rosdistro_migrate_to_rep_143 | 11 +++++++++++ scripts/rosdistro_reformat | 11 +++++++++++ src/rosdistro/cli/rosdistro.py | 2 -- src/rosdistro/cli/rosdistro_build_cache.py | 2 -- src/rosdistro/cli/rosdistro_convert.py | 2 -- src/rosdistro/cli/rosdistro_freeze_source.py | 2 -- src/rosdistro/cli/rosdistro_generate_cache.py | 2 -- src/rosdistro/cli/rosdistro_migrate_to_rep_141.py | 2 -- src/rosdistro/cli/rosdistro_migrate_to_rep_143.py | 2 -- src/rosdistro/cli/rosdistro_reformat.py | 2 -- 16 files changed, 88 insertions(+), 16 deletions(-) create mode 100755 scripts/rosdistro create mode 100755 scripts/rosdistro_build_cache create mode 100755 scripts/rosdistro_convert create mode 100755 scripts/rosdistro_freeze_source create mode 100755 scripts/rosdistro_generate_cache create mode 100755 scripts/rosdistro_migrate_to_rep_141 create mode 100755 scripts/rosdistro_migrate_to_rep_143 create mode 100755 scripts/rosdistro_reformat mode change 100755 => 100644 src/rosdistro/cli/rosdistro.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_build_cache.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_convert.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_freeze_source.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_generate_cache.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_migrate_to_rep_141.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_migrate_to_rep_143.py mode change 100755 => 100644 src/rosdistro/cli/rosdistro_reformat.py diff --git a/scripts/rosdistro b/scripts/rosdistro new file mode 100755 index 00000000..2bec693b --- /dev/null +++ b/scripts/rosdistro @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro import main + +if __name__ == '__main__': + print('The rosdistro script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_build_cache b/scripts/rosdistro_build_cache new file mode 100755 index 00000000..a042df64 --- /dev/null +++ b/scripts/rosdistro_build_cache @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_build_cache import main + +if __name__ == '__main__': + print('The rosdistro_build_cache script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_build_cache' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_convert b/scripts/rosdistro_convert new file mode 100755 index 00000000..42dc9485 --- /dev/null +++ b/scripts/rosdistro_convert @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_convert import main + +if __name__ == '__main__': + print('The rosdistro_convert is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_convert' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_freeze_source b/scripts/rosdistro_freeze_source new file mode 100755 index 00000000..3651da9f --- /dev/null +++ b/scripts/rosdistro_freeze_source @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_freeze_source import main + +if __name__ == '__main__': + print('The rosdistro_freeze_source script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_freeze_source' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_generate_cache b/scripts/rosdistro_generate_cache new file mode 100755 index 00000000..fcd74a2e --- /dev/null +++ b/scripts/rosdistro_generate_cache @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_generate_cache import main + +if __name__ == '__main__': + print('The rosdistro_generate_cache script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_generate_cache' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_migrate_to_rep_141 b/scripts/rosdistro_migrate_to_rep_141 new file mode 100755 index 00000000..4b05825c --- /dev/null +++ b/scripts/rosdistro_migrate_to_rep_141 @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_migrate_to_rep_141 import main + +if __name__ == '__main__': + print('The rosdistro_migrate_to_rep_141 script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_migrate_to_rep_141' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_migrate_to_rep_143 b/scripts/rosdistro_migrate_to_rep_143 new file mode 100755 index 00000000..44ba8c15 --- /dev/null +++ b/scripts/rosdistro_migrate_to_rep_143 @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_migrate_to_rep_143 import main + +if __name__ == '__main__': + print('The rosdistro_migrate_to_rep_143 script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_migrate_to_rep_143' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/scripts/rosdistro_reformat b/scripts/rosdistro_reformat new file mode 100755 index 00000000..247dad5d --- /dev/null +++ b/scripts/rosdistro_reformat @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys + +from rosdistro.cli.rosdistro_reformat import main + +if __name__ == '__main__': + print('The rosdistro_reformat script is deprecated. Use python3 ' + "-m 'rosdistro.cli.rosdistro_reformat' instead.\n", + file=sys.stderr) + sys.exit(main()) diff --git a/src/rosdistro/cli/rosdistro.py b/src/rosdistro/cli/rosdistro.py old mode 100755 new mode 100644 index 5341d85a..d5169fba --- a/src/rosdistro/cli/rosdistro.py +++ b/src/rosdistro/cli/rosdistro.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - import optparse import sys diff --git a/src/rosdistro/cli/rosdistro_build_cache.py b/src/rosdistro/cli/rosdistro_build_cache.py old mode 100755 new mode 100644 index d0779e36..a97e4626 --- a/src/rosdistro/cli/rosdistro_build_cache.py +++ b/src/rosdistro/cli/rosdistro_build_cache.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, Inc. diff --git a/src/rosdistro/cli/rosdistro_convert.py b/src/rosdistro/cli/rosdistro_convert.py old mode 100755 new mode 100644 index 536ad944..653672a5 --- a/src/rosdistro/cli/rosdistro_convert.py +++ b/src/rosdistro/cli/rosdistro_convert.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, Inc. diff --git a/src/rosdistro/cli/rosdistro_freeze_source.py b/src/rosdistro/cli/rosdistro_freeze_source.py old mode 100755 new mode 100644 index 25f59121..54a7b627 --- a/src/rosdistro/cli/rosdistro_freeze_source.py +++ b/src/rosdistro/cli/rosdistro_freeze_source.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # Software License Agreement (BSD License) # # Copyright (c) 2016, Clearpath Robotics diff --git a/src/rosdistro/cli/rosdistro_generate_cache.py b/src/rosdistro/cli/rosdistro_generate_cache.py old mode 100755 new mode 100644 index f47d75c8..ad59de6c --- a/src/rosdistro/cli/rosdistro_generate_cache.py +++ b/src/rosdistro/cli/rosdistro_generate_cache.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - import optparse import sys diff --git a/src/rosdistro/cli/rosdistro_migrate_to_rep_141.py b/src/rosdistro/cli/rosdistro_migrate_to_rep_141.py old mode 100755 new mode 100644 index 3531d5a3..6f8faca1 --- a/src/rosdistro/cli/rosdistro_migrate_to_rep_141.py +++ b/src/rosdistro/cli/rosdistro_migrate_to_rep_141.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - import argparse import gzip import os diff --git a/src/rosdistro/cli/rosdistro_migrate_to_rep_143.py b/src/rosdistro/cli/rosdistro_migrate_to_rep_143.py old mode 100755 new mode 100644 index 599394c5..91aa2efc --- a/src/rosdistro/cli/rosdistro_migrate_to_rep_143.py +++ b/src/rosdistro/cli/rosdistro_migrate_to_rep_143.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - import argparse import sys diff --git a/src/rosdistro/cli/rosdistro_reformat.py b/src/rosdistro/cli/rosdistro_reformat.py old mode 100755 new mode 100644 index 62ebd6c9..0983c7fc --- a/src/rosdistro/cli/rosdistro_reformat.py +++ b/src/rosdistro/cli/rosdistro_reformat.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, Inc.