Use tabs as indentation consistently
This commit is contained in:
committed by
Oliver Brakmann
parent
b3ee8b447e
commit
a6d8d6cd8e
@@ -23,22 +23,22 @@ export MONO_CONFIG="${HERE}/etc/mono/config"
|
|||||||
|
|
||||||
# Update/create the mono certificate store to enable https web queries
|
# Update/create the mono certificate store to enable https web queries
|
||||||
if [ -f "/etc/pki/tls/certs/ca-bundle.crt" ]; then
|
if [ -f "/etc/pki/tls/certs/ca-bundle.crt" ]; then
|
||||||
mono "${HERE}/usr/lib/mono/4.5/cert-sync.exe" --quiet --user /etc/pki/tls/certs/ca-bundle.crt
|
mono "${HERE}/usr/lib/mono/4.5/cert-sync.exe" --quiet --user /etc/pki/tls/certs/ca-bundle.crt
|
||||||
elif [ -f "/etc/ssl/certs/ca-certificates.crt" ]; then
|
elif [ -f "/etc/ssl/certs/ca-certificates.crt" ]; then
|
||||||
mono "${HERE}/usr/lib/mono/4.5/cert-sync.exe" --quiet --user /etc/ssl/certs/ca-certificates.crt
|
mono "${HERE}/usr/lib/mono/4.5/cert-sync.exe" --quiet --user /etc/ssl/certs/ca-certificates.crt
|
||||||
else
|
else
|
||||||
echo "WARNING: Unable to sync system certificate store - https requests will fail"
|
echo "WARNING: Unable to sync system certificate store - https requests will fail"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the game or server
|
# Run the game or server
|
||||||
if [ -n "$1" ] && [ "$1" = "--server" ]; then
|
if [ -n "$1" ] && [ "$1" = "--server" ]; then
|
||||||
# Drop the --server argument
|
# Drop the --server argument
|
||||||
shift
|
shift
|
||||||
exec "openra-{MODID}-server" "$@"
|
exec "openra-{MODID}-server" "$@"
|
||||||
elif [ -n "$1" ] && [ "$1" = "--utility" ]; then
|
elif [ -n "$1" ] && [ "$1" = "--utility" ]; then
|
||||||
# Drop the --utility argument
|
# Drop the --utility argument
|
||||||
shift
|
shift
|
||||||
exec "openra-{MODID}-utility" "$@"
|
exec "openra-{MODID}-utility" "$@"
|
||||||
else
|
else
|
||||||
exec "openra-{MODID}" "$@"
|
exec "openra-{MODID}" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -6,31 +6,31 @@ cd "${HERE}/../lib/openra" || exit 1
|
|||||||
# APPIMAGE is an environment variable set by the runtime
|
# APPIMAGE is an environment variable set by the runtime
|
||||||
# defining the absolute path to the .AppImage file
|
# defining the absolute path to the .AppImage file
|
||||||
if [ -n "${APPIMAGE}" ]; then
|
if [ -n "${APPIMAGE}" ]; then
|
||||||
LAUNCHER=${APPIMAGE}
|
LAUNCHER=${APPIMAGE}
|
||||||
|
|
||||||
# appimaged doesn't update the mime or icon caches when registering AppImages.
|
# appimaged doesn't update the mime or icon caches when registering AppImages.
|
||||||
# Run update-desktop-database and gtk-update-icon-cache ourselves if we detect
|
# Run update-desktop-database and gtk-update-icon-cache ourselves if we detect
|
||||||
# that the desktop file has been installed but the handler is not cached
|
# that the desktop file has been installed but the handler is not cached
|
||||||
if command -v update-desktop-database > /dev/null; then
|
if command -v update-desktop-database > /dev/null; then
|
||||||
APPIMAGEID=$(printf "file://%s" "${APPIMAGE}" | md5sum | cut -d' ' -f1)
|
APPIMAGEID=$(printf "file://%s" "${APPIMAGE}" | md5sum | cut -d' ' -f1)
|
||||||
LAUNCHER_NAME="appimagekit_${APPIMAGEID}-openra-{MODID}.desktop"
|
LAUNCHER_NAME="appimagekit_${APPIMAGEID}-openra-{MODID}.desktop"
|
||||||
LAUNCHER_PATH="${HOME}/.local/share/applications/${LAUNCHER_NAME}"
|
LAUNCHER_PATH="${HOME}/.local/share/applications/${LAUNCHER_NAME}"
|
||||||
MIMECACHE_PATH="${HOME}/.local/share/applications/mimeinfo.cache"
|
MIMECACHE_PATH="${HOME}/.local/share/applications/mimeinfo.cache"
|
||||||
SCHEME="x-scheme-handler/openra-{MODID}-{TAG}"
|
SCHEME="x-scheme-handler/openra-{MODID}-{TAG}"
|
||||||
if [ -f "${LAUNCHER_PATH}" ] && ! grep -qs "${SCHEME}=" "${MIMECACHE_PATH}"; then
|
if [ -f "${LAUNCHER_PATH}" ] && ! grep -qs "${SCHEME}=" "${MIMECACHE_PATH}"; then
|
||||||
update-desktop-database "${HOME}/.local/share/applications"
|
update-desktop-database "${HOME}/.local/share/applications"
|
||||||
if command -v gtk-update-icon-cache > /dev/null; then
|
if command -v gtk-update-icon-cache > /dev/null; then
|
||||||
gtk-update-icon-cache ~/.local/share/icons/hicolor/ -t
|
gtk-update-icon-cache ~/.local/share/icons/hicolor/ -t
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Search for server connection
|
# Search for server connection
|
||||||
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
|
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
|
||||||
JOIN_SERVER=""
|
JOIN_SERVER=""
|
||||||
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
|
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
|
||||||
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
|
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the game
|
# Run the game
|
||||||
@@ -39,15 +39,15 @@ mono --debug OpenRA.Game.exe Game.Mod={MODID} Engine.LaunchPath="${LAUNCHER}" En
|
|||||||
|
|
||||||
# Show a crash dialog if something went wrong
|
# Show a crash dialog if something went wrong
|
||||||
if [ $? != 0 ] && [ $? != 1 ]; then
|
if [ $? != 0 ] && [ $? != 1 ]; then
|
||||||
ERROR_MESSAGE="{MODNAME} has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ"
|
ERROR_MESSAGE="{MODNAME} has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ"
|
||||||
if command -v zenity > /dev/null; then
|
if command -v zenity > /dev/null; then
|
||||||
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
|
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
|
||||||
elif command -v kdialog > /dev/null; then
|
elif command -v kdialog > /dev/null; then
|
||||||
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
|
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
|
||||||
elif "${HERE}/gtk-dialog.py" test > /dev/null; then
|
elif "${HERE}/gtk-dialog.py" test > /dev/null; then
|
||||||
"${HERE}/gtk-dialog.py" error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
|
"${HERE}/gtk-dialog.py" error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
|
||||||
else
|
else
|
||||||
printf "${ERROR_MESSAGE}\n"
|
printf "${ERROR_MESSAGE}\n"
|
||||||
fi
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ cd "{GAME_INSTALL_DIR}"
|
|||||||
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
|
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
|
||||||
JOIN_SERVER=""
|
JOIN_SERVER=""
|
||||||
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
|
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
|
||||||
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
|
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the game
|
# Run the game
|
||||||
@@ -13,13 +13,13 @@ mono {DEBUG} OpenRA.Game.exe Game.Mod={MODID} Engine.LaunchPath="{BIN_DIR}/openr
|
|||||||
|
|
||||||
# Show a crash dialog if something went wrong
|
# Show a crash dialog if something went wrong
|
||||||
if [ $? != 0 ] && [ $? != 1 ]; then
|
if [ $? != 0 ] && [ $? != 1 ]; then
|
||||||
ERROR_MESSAGE="{MODNAME} has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ"
|
ERROR_MESSAGE="{MODNAME} has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ"
|
||||||
if command -v zenity > /dev/null; then
|
if command -v zenity > /dev/null; then
|
||||||
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
|
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
|
||||||
elif command -v kdialog > /dev/null; then
|
elif command -v kdialog > /dev/null; then
|
||||||
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
|
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
|
||||||
else
|
else
|
||||||
printf "${ERROR_MESSAGE}\n"
|
printf "${ERROR_MESSAGE}\n"
|
||||||
fi
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ unset OPENRA_ORIG_PATH OPENRA_ORIG_XDG_DATA_DIRS OPENRA_ORIG_DYLD_LIBRARY_PATH O
|
|||||||
|
|
||||||
unset MONO_PATH MONO_CFG_DIR MONO_CONFIG
|
unset MONO_PATH MONO_CFG_DIR MONO_CONFIG
|
||||||
if [ -n "${OPENRA_ORIG_MONO_PATH}" ]; then
|
if [ -n "${OPENRA_ORIG_MONO_PATH}" ]; then
|
||||||
export MONO_PATH="${OPENRA_ORIG_MONO_PATH}"
|
export MONO_PATH="${OPENRA_ORIG_MONO_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${OPENRA_ORIG_MONO_CFG_DIR}" ]; then
|
if [ -n "${OPENRA_ORIG_MONO_CFG_DIR}" ]; then
|
||||||
export MONO_CFG_DIR="${OPENRA_ORIG_MONO_CFG_DIR}"
|
export MONO_CFG_DIR="${OPENRA_ORIG_MONO_CFG_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${OPENRA_ORIG_MONO_CONFIG}" ]; then
|
if [ -n "${OPENRA_ORIG_MONO_CONFIG}" ]; then
|
||||||
export MONO_CONFIG="${OPENRA_ORIG_MONO_CONFIG}"
|
export MONO_CONFIG="${OPENRA_ORIG_MONO_CONFIG}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset SDL_VIDEO_X11_WMCLASS OPENRA_ORIG_MONO_PATH OPENRA_ORIG_MONO_CFG_DIR OPENRA_ORIG_MONO_CONFIG
|
unset SDL_VIDEO_X11_WMCLASS OPENRA_ORIG_MONO_PATH OPENRA_ORIG_MONO_CFG_DIR OPENRA_ORIG_MONO_CONFIG
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
# OpenRA master packaging script
|
# OpenRA master packaging script
|
||||||
|
|
||||||
if [ $# -ne "2" ]; then
|
if [ $# -ne "2" ]; then
|
||||||
echo "Usage: ${0##*/} version outputdir."
|
echo "Usage: ${0##*/} version outputdir."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export GIT_TAG="$1"
|
export GIT_TAG="$1"
|
||||||
@@ -14,15 +14,15 @@ cd "${0%/*}" || exit 1
|
|||||||
|
|
||||||
#build packages using a subshell so directory changes do not persist beyond the function
|
#build packages using a subshell so directory changes do not persist beyond the function
|
||||||
function build_package() (
|
function build_package() (
|
||||||
function on_build() {
|
function on_build() {
|
||||||
echo "$1 package build failed." 1>&2
|
echo "$1 package build failed." 1>&2
|
||||||
}
|
}
|
||||||
#trap function executes on any error in the following commands
|
#trap function executes on any error in the following commands
|
||||||
trap "on_build $1" ERR
|
trap "on_build $1" ERR
|
||||||
set -e
|
set -e
|
||||||
echo "Building $1 package(s)."
|
echo "Building $1 package(s)."
|
||||||
cd "$1"
|
cd "$1"
|
||||||
./buildpackage.sh "${GIT_TAG}" "${BUILD_OUTPUT_DIR}"
|
./buildpackage.sh "${GIT_TAG}" "${BUILD_OUTPUT_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
#exit on any non-zero exited (failed) command
|
#exit on any non-zero exited (failed) command
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
# OpenRA packaging script for versioned source tarball
|
# OpenRA packaging script for versioned source tarball
|
||||||
|
|
||||||
if [ $# -ne "2" ]; then
|
if [ $# -ne "2" ]; then
|
||||||
echo "Usage: $(basename "$0") tag outputdir"
|
echo "Usage: $(basename "$0") tag outputdir"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the working dir to the location of this script
|
# Set the working dir to the location of this script
|
||||||
|
|||||||
Reference in New Issue
Block a user