From 631d1399a169f99457811ebf183f08102b864fb1 Mon Sep 17 00:00:00 2001 From: Jim Grady Date: Fri, 27 Sep 2024 14:04:55 -0400 Subject: [PATCH] Fix shebang for Python scripts (#3370) * Fix shebang to work for Linux and Git Bash shells on Windows --- deploy/scripts/app_release.py | 2 +- deploy/scripts/aws_env.py | 2 +- deploy/scripts/build.py | 2 +- deploy/scripts/check_certs.py | 2 +- deploy/scripts/combine_charts.py | 2 +- deploy/scripts/kube_env.py | 2 +- deploy/scripts/package_images.py | 2 +- deploy/scripts/sem_dom_import.py | 2 +- deploy/scripts/setup_cluster.py | 2 +- deploy/scripts/setup_combine.py | 2 +- deploy/scripts/setup_target.py | 2 +- maintenance/scripts/add_user_to_proj.py | 2 +- maintenance/scripts/combine_backup.py | 2 +- maintenance/scripts/combine_restore.py | 2 +- maintenance/scripts/db_update_audio_type.py | 2 +- maintenance/scripts/get_fonts.py | 2 +- maintenance/scripts/monitor.py | 2 +- maintenance/scripts/rm_project.py | 2 +- maintenance/scripts/update_cert.py | 2 +- scripts/clean_aws_repo.py | 2 +- scripts/cleanup_local_repo.py | 2 +- scripts/generate_openapi.py | 2 +- scripts/get_fonts_dev.py | 2 +- scripts/split_dictionary.py | 2 +- scripts/subtitle_tutorial_video.py | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/deploy/scripts/app_release.py b/deploy/scripts/app_release.py index e7bbb1d3f1..604cd369fb 100755 --- a/deploy/scripts/app_release.py +++ b/deploy/scripts/app_release.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python from __future__ import annotations diff --git a/deploy/scripts/aws_env.py b/deploy/scripts/aws_env.py index ed7d983324..251bc8fabe 100755 --- a/deploy/scripts/aws_env.py +++ b/deploy/scripts/aws_env.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python """Set AWS Environment variables from aws cli profiles.""" from __future__ import annotations diff --git a/deploy/scripts/build.py b/deploy/scripts/build.py index 09237f4fb0..969c1533be 100755 --- a/deploy/scripts/build.py +++ b/deploy/scripts/build.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Build the containerd images for The Combine. diff --git a/deploy/scripts/check_certs.py b/deploy/scripts/check_certs.py index b7224dd900..cbd47e6a43 100755 --- a/deploy/scripts/check_certs.py +++ b/deploy/scripts/check_certs.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python import argparse import subprocess diff --git a/deploy/scripts/combine_charts.py b/deploy/scripts/combine_charts.py index 6e5750af6a..3dff99e3b9 100755 --- a/deploy/scripts/combine_charts.py +++ b/deploy/scripts/combine_charts.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python """ Update the Helm chart version with the specified version. """ diff --git a/deploy/scripts/kube_env.py b/deploy/scripts/kube_env.py index 2e70824f56..413ded5b32 100755 --- a/deploy/scripts/kube_env.py +++ b/deploy/scripts/kube_env.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """Manage the Kubernetes environment for kubectl & helm.""" from __future__ import annotations diff --git a/deploy/scripts/package_images.py b/deploy/scripts/package_images.py index 858f518122..66cebe5b6d 100755 --- a/deploy/scripts/package_images.py +++ b/deploy/scripts/package_images.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python """ Package the container images used for The Combine to support air-gapped installation. diff --git a/deploy/scripts/sem_dom_import.py b/deploy/scripts/sem_dom_import.py index d434655288..d91823f013 100755 --- a/deploy/scripts/sem_dom_import.py +++ b/deploy/scripts/sem_dom_import.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python """ Create data files for importing the Semantic Domain information into the Mongo database. diff --git a/deploy/scripts/setup_cluster.py b/deploy/scripts/setup_cluster.py index aee6ef1af4..e65abd52fe 100755 --- a/deploy/scripts/setup_cluster.py +++ b/deploy/scripts/setup_cluster.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """Install the pre-requisite helm charts for the Combine on a k8s cluster.""" from __future__ import annotations diff --git a/deploy/scripts/setup_combine.py b/deploy/scripts/setup_combine.py index efb8c2c1f2..4320a0cf6f 100755 --- a/deploy/scripts/setup_combine.py +++ b/deploy/scripts/setup_combine.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python """ Install The Combine Helm charts on a specified Kubernetes cluster. diff --git a/deploy/scripts/setup_target.py b/deploy/scripts/setup_target.py index 3bce8d35c7..821905e0f3 100755 --- a/deploy/scripts/setup_target.py +++ b/deploy/scripts/setup_target.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python import argparse import os diff --git a/maintenance/scripts/add_user_to_proj.py b/maintenance/scripts/add_user_to_proj.py index b9e5a62f44..cebdb9e526 100755 --- a/maintenance/scripts/add_user_to_proj.py +++ b/maintenance/scripts/add_user_to_proj.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Add user to a project. diff --git a/maintenance/scripts/combine_backup.py b/maintenance/scripts/combine_backup.py index 9841e2715b..a73f176321 100755 --- a/maintenance/scripts/combine_backup.py +++ b/maintenance/scripts/combine_backup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """Create a backup of TheCombine and push the file to AWS S3 service.""" import argparse diff --git a/maintenance/scripts/combine_restore.py b/maintenance/scripts/combine_restore.py index d98b9e55df..868738f994 100755 --- a/maintenance/scripts/combine_restore.py +++ b/maintenance/scripts/combine_restore.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Restore The Combine from a backup stored in the AWS S3 service. diff --git a/maintenance/scripts/db_update_audio_type.py b/maintenance/scripts/db_update_audio_type.py index 5b2ea027e9..3c3cb0244e 100755 --- a/maintenance/scripts/db_update_audio_type.py +++ b/maintenance/scripts/db_update_audio_type.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python import argparse import logging diff --git a/maintenance/scripts/get_fonts.py b/maintenance/scripts/get_fonts.py index 2186be0cd1..d3904b0ecf 100755 --- a/maintenance/scripts/get_fonts.py +++ b/maintenance/scripts/get_fonts.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Generates font support for all SIL fonts used in Mui-Language-Picker. diff --git a/maintenance/scripts/monitor.py b/maintenance/scripts/monitor.py index 8e82c8396d..191d7e9666 100755 --- a/maintenance/scripts/monitor.py +++ b/maintenance/scripts/monitor.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Monitor TLS secrets for changes and push changes to AWS S3. diff --git a/maintenance/scripts/rm_project.py b/maintenance/scripts/rm_project.py index ffeddf4345..d35fd4dabf 100755 --- a/maintenance/scripts/rm_project.py +++ b/maintenance/scripts/rm_project.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Remove a project and its associated data from TheCombine. diff --git a/maintenance/scripts/update_cert.py b/maintenance/scripts/update_cert.py index ada2cdcf9b..0068be981b 100755 --- a/maintenance/scripts/update_cert.py +++ b/maintenance/scripts/update_cert.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Check the expiration time of the TLS secret and update if needed. diff --git a/scripts/clean_aws_repo.py b/scripts/clean_aws_repo.py index a4ea7f8383..6a03a66cf9 100755 --- a/scripts/clean_aws_repo.py +++ b/scripts/clean_aws_repo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ This script cleans out old docker images from the AWS ECR repository. diff --git a/scripts/cleanup_local_repo.py b/scripts/cleanup_local_repo.py index 9cbb2d06a8..d9e0fe9a11 100755 --- a/scripts/cleanup_local_repo.py +++ b/scripts/cleanup_local_repo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """Remove all temporary files and folders within the local Git repository. diff --git a/scripts/generate_openapi.py b/scripts/generate_openapi.py index bc1bb21225..7d4383b892 100644 --- a/scripts/generate_openapi.py +++ b/scripts/generate_openapi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """Regenerate the frontend OpenAPI bindings to the backend. diff --git a/scripts/get_fonts_dev.py b/scripts/get_fonts_dev.py index 1c035b6460..9f4b3ec820 100755 --- a/scripts/get_fonts_dev.py +++ b/scripts/get_fonts_dev.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Runs maintenance/scripts/get_fonts.py with dev arguments for -f and -o. diff --git a/scripts/split_dictionary.py b/scripts/split_dictionary.py index 00e008ecd1..d922df9a9b 100644 --- a/scripts/split_dictionary.py +++ b/scripts/split_dictionary.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Splits a dictionary file into smaller files. """ diff --git a/scripts/subtitle_tutorial_video.py b/scripts/subtitle_tutorial_video.py index 32d792daec..5d7533b7f9 100644 --- a/scripts/subtitle_tutorial_video.py +++ b/scripts/subtitle_tutorial_video.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Add subtitles to a tutorial video. If video path is not provided, still generates .srt files.