From af88327c73b6714d1bfb671d5629394d46c0b25d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 20 Jan 2021 18:30:03 -0300 Subject: Move shebangs and script calls to POSIX --- scripts/apply-translations.sh | 3 ++- scripts/assert-nixfmt.sh | 3 ++- scripts/assert-shellcheck.sh | 3 ++- scripts/assert-spelling.sh | 3 ++- scripts/assert-todos.sh | 3 ++- scripts/bundix-gen.sh | 3 ++- scripts/extract-translations.sh | 3 ++- scripts/sync-translations.sh | 7 ++++--- tests.sh | 13 +++++++------ 9 files changed, 25 insertions(+), 16 deletions(-) diff --git a/scripts/apply-translations.sh b/scripts/apply-translations.sh index 1148b60..e1b92db 100755 --- a/scripts/apply-translations.sh +++ b/scripts/apply-translations.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eu +#!/bin/sh +set -eu for f in $(git ls-files | grep -E '.(md|slides)$' | grep -v '^vendor/reveal.js$'); do l="$(grep '^lang: ..$' "$f" | awk '{print $2}')" diff --git a/scripts/assert-nixfmt.sh b/scripts/assert-nixfmt.sh index 761c1e2..9bdd3bf 100755 --- a/scripts/assert-nixfmt.sh +++ b/scripts/assert-nixfmt.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eux +#!/bin/sh +set -eux # shellcheck disable=2094 nixfmt < default.nix | diff - default.nix || { diff --git a/scripts/assert-shellcheck.sh b/scripts/assert-shellcheck.sh index 70ea65a..76fb2d0 100755 --- a/scripts/assert-shellcheck.sh +++ b/scripts/assert-shellcheck.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eux +#!/bin/sh +set -eux git ls-files -z | \ grep -zv vendor | \ diff --git a/scripts/assert-spelling.sh b/scripts/assert-spelling.sh index f4ab58e..37cec6e 100755 --- a/scripts/assert-spelling.sh +++ b/scripts/assert-spelling.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eu +#!/bin/sh +set -eu export LANG=C.UTF-8 diff --git a/scripts/assert-todos.sh b/scripts/assert-todos.sh index dabe680..ac72057 100755 --- a/scripts/assert-todos.sh +++ b/scripts/assert-todos.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eu +#!/bin/sh +set -eu if git grep FIXME | grep -Ev '^(vendor/|scripts/assert-todos.sh|locale/)'; then echo "Found dangling FIXME markers on the project." diff --git a/scripts/bundix-gen.sh b/scripts/bundix-gen.sh index 6d5032f..7b4650d 100755 --- a/scripts/bundix-gen.sh +++ b/scripts/bundix-gen.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eux +#!/bin/sh +set -eux bundler package --no-install --path vendor bundix diff --git a/scripts/extract-translations.sh b/scripts/extract-translations.sh index ea4b0f5..2333865 100755 --- a/scripts/extract-translations.sh +++ b/scripts/extract-translations.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eu +#!/bin/sh +set -eu TRANSLATIONS='pt fr eo' diff --git a/scripts/sync-translations.sh b/scripts/sync-translations.sh index 1e86340..20e2a78 100755 --- a/scripts/sync-translations.sh +++ b/scripts/sync-translations.sh @@ -1,4 +1,5 @@ -#!/bin/sh -eux +#!/bin/sh +set -eux -./scripts/extract-translations.sh -./scripts/apply-translations.sh +sh scripts/extract-translations.sh +sh scripts/apply-translations.sh diff --git a/tests.sh b/tests.sh index 7946452..4eddfe0 100755 --- a/tests.sh +++ b/tests.sh @@ -1,8 +1,9 @@ -#!/bin/sh -eux +#!/bin/sh +set -eux -./scripts/assert-spelling.sh -./scripts/assert-nixfmt.sh -./scripts/assert-shellcheck.sh -./scripts/assert-todos.sh +sh scripts/assert-spelling.sh +sh scripts/assert-nixfmt.sh +sh scripts/assert-shellcheck.sh +sh scripts/assert-todos.sh -./scripts/sync-translations.sh +sh scripts/sync-translations.sh -- cgit v1.2.3