Skip to content

Commit 798cd09

Browse files
committed
scripts: fix shellcheck error and warnings
1 parent c9daa1d commit 798cd09

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

.github/scripts/check-commit-titles.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
2+
# shellcheck disable=SC2317
23

34
# This script reads newline separated commit titles from stdin
45
# output an error message when titles are deemed invalid,
56
# and exits accordingly
67

78
if [ -z "$NOCOLOR" ]; then
89
RED=$(tput setaf 1 2>/dev/null)
9-
YELLOW=$(tput setaf 3 2>/dev/null)
1010
BLUE=$(tput setaf 4 2>/dev/null)
1111
RESET=$(tput sgr0 2>/dev/null)
1212
fi

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ jobs:
202202

203203
- name: Find and check all scripts using ShellCheck
204204
uses: ludeeus/action-shellcheck@master
205+
with:
206+
ignore_names: gradlew
205207

206208
check_generated_railjson_sync:
207209
runs-on: ubuntu-latest

editoast/assets/signal_sprites/generate-atlas.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ for signaling_system in $(ls); do
2020
cp "${tmp_dir}"/sprites/sprites* "${signaling_system}"
2121

2222
# Add a linefeed to the json files
23-
for json_file in $(ls "${signaling_system}"/*.json); do
23+
for json_file in "${signaling_system}"/*.json; do
24+
[ -e "$json_file" ] || continue
2425
echo "" >> "${json_file}"
2526
done
2627

scripts/drop-core.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22

3-
docker rm -f dyn-osrd-core-$1
3+
docker rm -f "dyn-osrd-core-$1"
44

55
docker compose \
66
-p "osrd" \
77
-f "docker-compose.yml" \
8-
exec rabbitmq rabbitmqctl delete_queue core-$1
8+
exec rabbitmq rabbitmqctl delete_queue "core-$1"

scripts/load-backup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ "$#" -ne 1 ]; then
1414
exit 1
1515
fi
1616

17-
root_path="$(realpath $(dirname "$0")/..)"
17+
root_path=$(realpath "$(dirname "$0")/..")
1818

1919
# Check sha1 is matching
2020
echo "Checking backup integrity..."

0 commit comments

Comments
 (0)