Skip to content

Commit b06400d

Browse files
committed
Replace #!/bin/bash with posix compliant shebang
Signed-off-by: Marko Lindqvist <[email protected]>
1 parent d3a177a commit b06400d

28 files changed

+41
-33
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ EXPOSE 80 8080 4002 6000 6001 6002 7000 7001 7002
6464

6565
ENTRYPOINT ["/docker/docker-entrypoint.sh"]
6666

67-
CMD ["/bin/bash"]
67+
CMD ["/usr/bin/env bash"]

config/gen-from-templates.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (C) 2018 The Freeciv-web project
44
#

docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
/docker/scripts/start-freeciv-web.sh
44

freeciv-web/build-js.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/bin/bash
2-
# builds javascript files Freeciv-web and copies the resulting file to tomcat.
1+
#!/usr/bin/env bash
2+
3+
# Builds javascript files Freeciv-web and copies the resulting file to tomcat.
34

45
FCW_DEST=/var/lib/tomcat10/webapps/freeciv-web
56

freeciv-web/build.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/bin/bash
2-
# builds Freeciv-web and copies the war file to Tomcat.
1+
#!/usr/bin/env bash
2+
3+
# Builds Freeciv-web and copies the war file to Tomcat.
34

45
BATCH_MODE=""
56

freeciv/apply_patches.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Freeciv server version upgrade notes (backports)
44
# ------------------------------------------------

freeciv/dl_freeciv_default.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env -S bash -e
22

33
# Places the specified revision of Freeciv in freeciv/freeciv/
44
# This is the default. The script dl_freeciv.sh will run instead of

freeciv/prepare_freeciv.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
44
cd "${DIR}"

pbem/restart.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/bin/bash
2-
# nightly restart of PBEM process.
1+
#!/usr/bin/env bash
2+
3+
# Nightly restart of PBEM process.
34

45
kill $(ps -ef | grep python| grep pbem | awk '{print $2}')
56
sleep 4

publite2/init-freeciv-web.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#! /bin/bash
2-
# starts freeciv-proxy and freeciv-web.
1+
#!/usr/bin/env bash
2+
3+
# Starts freeciv-proxy and freeciv-web.
34
# This script is started by civlauncher.py in publite2.
45

56
if [ "$#" -ne 6 ]; then

publite2/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
nohup python3 -u publite2.py > ../logs/publite2.log 2>&1 || tail -5 ../logs/publite2.log && sleep 5 &

scripts/freeciv-img-extract/sync.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
resolve() { echo "$(cd "$1" >/dev/null && pwd)"; }
44
while [[ $# -gt 0 ]]; do

scripts/helpdata_gen/ruleset_auto_gen.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Freeciv has code that generates certain help texts based on the ruleset.
44
# This code is written in C. It is huge. Replicating it in JavaScript would

scripts/install/dependency-services-default-start.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Start Freeciv-web's dependency services.
44
#

scripts/install/dependency-services-default-stop.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Shutdown Freeciv-web's dependency services.
44
#

scripts/install/dependency-services-systemd-start.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Use systemd to start the services Freeciv-web depends on.
44
# Need to start the dependency services in a different way to work with

scripts/install/dependency-services-systemd-stop.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Use systemd to stop the services Freeciv-web depends on.
44
# Need to start the dependency services in a different way to work with

scripts/install/install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (C) 2018 The Freeciv-web project
44
#

scripts/log-cleanup.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/bin/bash
2-
# cleans up logs
1+
#!/usr/bin/env bash
2+
3+
# Cleans up logs
34

45
find /home/freeciv/freeciv-web/freeciv-web/logs/*.log -exec cp /dev/null {} \;
56
cp /dev/null /usr/local/nginx/logs/access.log

scripts/migration/0001-update-python-dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. >/dev/null && pwd)"
44

scripts/migration/0002-local-handlebars.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. >/dev/null && pwd)"
44

scripts/migration/migrate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (C) 2018 The Freeciv-web project
44
#

scripts/modpack-install/modpacks_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Install modpacks listed in freeciv/modpackURLs.lst
44

scripts/restart-tomcat.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
export JAVA_OPTS="-Djava.security.egd=file:/dev/urandom"
44
export CATALINA_HOME=/var/lib/tomcat10

scripts/start-freeciv-web.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
23
# Startup script for running all processes of Freeciv-web
34

45
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

scripts/status-freeciv-web.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
23
# Checks status of various Freeciv-web processes
34

45
alias curl='stdbuf -i0 -o0 -e0 curl'

scripts/stop-freeciv-web.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
23
# Shutdown script for Freeciv-web
34

45
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

scripts/sync-js-hand.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# -Synchronizes the javascript packet handler (packhand_gen.js)
44
# with the definitions in packets.def.

0 commit comments

Comments
 (0)