Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSIX compliance #8405

Merged
merged 3 commits into from Jun 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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"
Expand Down
16 changes: 8 additions & 8 deletions thirdparty/configure-linux-native-deps.sh
@@ -1,18 +1,18 @@
#!/bin/bash
#!/bin/sh
# Use Linux system dependencies where possible, but take into account different .so names.

os=`uname`
if [ "$os" == 'Linux' ]; then
locations=(/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/local/lib /opt/lib)
sonames=(liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so)
os="$(uname -s)"
if [ "$os" = 'Linux' ] || [ "$os" = 'FreeBSD' ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out your latest change completely breaks it for Ubuntu. Notice the missing line "Detected Lua 5.1 library" at https://travis-ci.org/OpenRA/OpenRA/builds/65695051

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an Ubuntu at hand. I'd appreciate it if someone had one and could actually post only the result of sh ./thirdparty/configure-linux-native-deps.sh after adding set -x right under the shebang.
It works on Archlinux and FreeBSD.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mailaender: the missing "Detected Lua" line is ok, lua isn't installed in the travis vm. (Which is ok, because the generated Eluant.dll.config isn't used for the debian package.)

locations="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/local/lib /opt/lib"
sonames="liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"

if [ -f Eluant.dll.config ]; then
exit 0
fi

for location in "${locations[@]}" ; do
for soname in ${sonames[@]} ; do
if [ -f $location/$soname ]; then
for location in $locations ; do
for soname in $sonames ; do
if [ -f "$location/$soname" ]; then
liblua51=$soname
echo "Detected Lua 5.1 library at "$location/$soname
break 2
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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"
Expand Down