From fbf0cb676f2dbfa483dea7797a0454307ef26251 Mon Sep 17 00:00:00 2001 From: Moviuro Date: Sat, 6 Jun 2015 16:16:30 +0200 Subject: [PATCH] *.sh: POSIX compliance when needed --- launch-dedicated.sh | 2 +- thirdparty/fetch-geoip-db.sh | 4 ++-- thirdparty/fetch-thirdparty-deps.sh | 4 ++-- thirdparty/noget.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/launch-dedicated.sh b/launch-dedicated.sh index 1d65a958bd..c5dd5ab77b 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated for details Name="Dedicated Server" Mod="ra" diff --git a/thirdparty/fetch-geoip-db.sh b/thirdparty/fetch-geoip-db.sh index 4e694f02eb..7fb5840161 100755 --- a/thirdparty/fetch-geoip-db.sh +++ b/thirdparty/fetch-geoip-db.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Die on any error for Travis CI to automatically retry: set -e @@ -10,7 +10,7 @@ cd "${download_dir}" filename="GeoLite2-Country.mmdb.gz" # Database does not exist or is older than 30 days. -if [[ ! -e $filename ]] || [[ -n $(find . -name $filename -mtime +30 -print) ]]; then +if [ ! -e $filename ] || [ -n "$(find . -name $filename -mtime +30 -print)" ]; then rm -f $filename echo "Updating GeoIP country database from MaxMind." curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename diff --git a/thirdparty/fetch-thirdparty-deps.sh b/thirdparty/fetch-thirdparty-deps.sh index 34112ced50..a265022828 100755 --- a/thirdparty/fetch-thirdparty-deps.sh +++ b/thirdparty/fetch-thirdparty-deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Die on any error for Travis CI to automatically retry: set -e @@ -8,7 +8,7 @@ download_dir="${0%/*}/download" mkdir -p "${download_dir}" cd "${download_dir}" -function get() +get() { if which nuget >/dev/null; then nuget install $1 -Version $2 -ExcludeVersion diff --git a/thirdparty/noget.sh b/thirdparty/noget.sh index 7346ea7495..87994d2827 100755 --- a/thirdparty/noget.sh +++ b/thirdparty/noget.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # fallback without dependency resolution if nuget is not present on the system archive="$1"