]> Untitled Git - lemmy.git/commitdiff
make shebangs posix compliant (#2974)
authorCharles Hall <charles@computer.surgery>
Thu, 8 Jun 2023 19:38:26 +0000 (12:38 -0700)
committerGitHub <noreply@github.com>
Thu, 8 Jun 2023 19:38:26 +0000 (15:38 -0400)
Previously, these scripts wouldn't work on exotic systems such as NixOS.

```
fd '\.sh$' -t f --exec sed -i 's@#!/bin/bash@#!/usr/bin/env bash@'
```

18 files changed:
api_tests/prepare-drone-federation-test.sh
api_tests/run-federation-test.sh
docker/docker_db_backup.sh
docker/test_deploy.sh
scripts/clear_db.sh
scripts/compilation_benchmark.sh
scripts/db-init.sh
scripts/fix-clippy.sh
scripts/install.sh
scripts/query_testing/apache_bench_report.sh
scripts/query_testing/api_benchmark.sh
scripts/query_testing/views_old/generate_reports.sh
scripts/query_testing/views_to_diesel_migration/generate_reports.sh
scripts/restore_db.sh
scripts/test.sh
scripts/update_config_defaults.sh
scripts/update_translations.sh
scripts/upgrade_deps.sh

index afe18e1d280977514676f049164cc142f76736b0..813b3b15c902f53f02f6e48d35c2e5fc90792094 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 export RUST_BACKTRACE=1
index ebde0c04d120729f74c14f6cbe03af4671c1bad9..ed4bba4167f9e8c90ba10137cba7e4da40a29ded 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432
index 0bfa68029f6772da37b664fe0cf9b6c2d17ae736..8ec3e70c7a0d1fd7d11bb6ed15164f0fe5c643c7 100755 (executable)
@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env bash
 docker-compose exec postgres pg_dumpall -c -U lemmy > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
index fe91ea317ba1cd5a7ceebf0ceee65f5894414a69..ff4eb5b9ffbd523e480660e8d10327dc77171084 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 export COMPOSE_DOCKER_CLI_BUILD=1
index b62490e12c95138bbf1830ce792cd345a1903858..dc53ee7ebc34d085a6fb404ed6711d4e6b2a1269 100755 (executable)
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public; DROP SCHEMA utils CASCADE;"
index af355734b12ac2bab5a995007436a23db0d6da51..93d1b6a23c151af7e2d8b83efff62a3e51b1a4c1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 times=3
index 04ce7b90132d006ccb9772ec54bf0ba995d97224..e7c97392c9ea0c3f38ce3aaea52248118b729fb6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 # Default configurations
index d85913783251fb5083790c9d1ca14622fb82b3f8..25b4b22ca6fb9dea18dc7697abfc13d681ede50c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
index 2a8390816cf86aca23f2e79d8b882f7fbe6c2300..874776b15f8dfd07fa11c95793e9cb69bb50efee 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 # Set the database variable to the default first.
index d062a5111d68fad780427fa070b94efb59decf6f..ae804a531e48d4458cae132033e1a296d2aaeedf 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 declare -a arr=(
index 9f06580a76c14e280e84b49e338d9ce4b17233d8..4c1ee9e1f0cb6eb0606772de2000152b244971b5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 # By default, this script runs against `http://127.0.0.1:8536`, but you can pass a different Lemmy instance,
index 8d2b4a05250e48fff30787c540d2b009242cea24..f52653f2d8eb89d8db9471747fe4f066b92de88c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 # You can import these to http://tatiyants.com/pev/#/plans/new
index 12993a0800e306645ce8ea1fc331b1840e5e68bf..aa443c1b10dbd704df106f75a07f87fad763fa76 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 # You can import these to http://tatiyants.com/pev/#/plans/new
index a886fc08d5870a97e6a12e0af92e5b8a830ff2e7..f77624fbb00d5fab1c03cf36807c4608826145a8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
 cat docker/lemmy_dump_2021-01-29_16_13_40.sqldump | psql -U lemmy
index e3239c7d37dbf9d93671966a89138cc989c48ede..f117238bd3154857c6da5a9dbf0e49fe11fd873d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 PACKAGE="$1"
index 07aceb3ef3f7553e3bbccdc544a82abfda1d89c2..024b8ca11453268e4e9e6668577f1589b1e6cf9a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 dest=${1-config/defaults.hjson}
index 71c62e99a714587331174e1ff663689d75ffe17e..1114f80488d9da2dad08f8278994110daaafd9cf 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 pushd ../../lemmy-translations
index 90adb896f371da7a375dd2da97dd22caa9b4c880..0c4ae6f0f20377676d314015f7c4d8e82a13d009 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 pushd ../