Use tabs as indentation consistently

This commit is contained in:
abcdefg30
2020-07-02 23:54:57 +02:00
committed by Oliver Brakmann
parent b3ee8b447e
commit a6d8d6cd8e
6 changed files with 65 additions and 65 deletions

View File

@@ -23,22 +23,22 @@ export MONO_CONFIG="${HERE}/etc/mono/config"
# Update/create the mono certificate store to enable https web queries
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
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
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
# Run the game or server
if [ -n "$1" ] && [ "$1" = "--server" ]; then
# Drop the --server argument
shift
exec "openra-{MODID}-server" "$@"
# Drop the --server argument
shift
exec "openra-{MODID}-server" "$@"
elif [ -n "$1" ] && [ "$1" = "--utility" ]; then
# Drop the --utility argument
shift
exec "openra-{MODID}-utility" "$@"
# Drop the --utility argument
shift
exec "openra-{MODID}-utility" "$@"
else
exec "openra-{MODID}" "$@"
exec "openra-{MODID}" "$@"
fi

View File

@@ -6,31 +6,31 @@ cd "${HERE}/../lib/openra" || exit 1
# APPIMAGE is an environment variable set by the runtime
# defining the absolute path to the .AppImage file
if [ -n "${APPIMAGE}" ]; then
LAUNCHER=${APPIMAGE}
LAUNCHER=${APPIMAGE}
# 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
# that the desktop file has been installed but the handler is not cached
if command -v update-desktop-database > /dev/null; then
APPIMAGEID=$(printf "file://%s" "${APPIMAGE}" | md5sum | cut -d' ' -f1)
LAUNCHER_NAME="appimagekit_${APPIMAGEID}-openra-{MODID}.desktop"
LAUNCHER_PATH="${HOME}/.local/share/applications/${LAUNCHER_NAME}"
MIMECACHE_PATH="${HOME}/.local/share/applications/mimeinfo.cache"
SCHEME="x-scheme-handler/openra-{MODID}-{TAG}"
if [ -f "${LAUNCHER_PATH}" ] && ! grep -qs "${SCHEME}=" "${MIMECACHE_PATH}"; then
update-desktop-database "${HOME}/.local/share/applications"
if command -v gtk-update-icon-cache > /dev/null; then
gtk-update-icon-cache ~/.local/share/icons/hicolor/ -t
fi
fi
fi
# 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
# that the desktop file has been installed but the handler is not cached
if command -v update-desktop-database > /dev/null; then
APPIMAGEID=$(printf "file://%s" "${APPIMAGE}" | md5sum | cut -d' ' -f1)
LAUNCHER_NAME="appimagekit_${APPIMAGEID}-openra-{MODID}.desktop"
LAUNCHER_PATH="${HOME}/.local/share/applications/${LAUNCHER_NAME}"
MIMECACHE_PATH="${HOME}/.local/share/applications/mimeinfo.cache"
SCHEME="x-scheme-handler/openra-{MODID}-{TAG}"
if [ -f "${LAUNCHER_PATH}" ] && ! grep -qs "${SCHEME}=" "${MIMECACHE_PATH}"; then
update-desktop-database "${HOME}/.local/share/applications"
if command -v gtk-update-icon-cache > /dev/null; then
gtk-update-icon-cache ~/.local/share/icons/hicolor/ -t
fi
fi
fi
fi
# Search for server connection
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
JOIN_SERVER=""
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
fi
# 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
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"
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
elif "${HERE}/gtk-dialog.py" test > /dev/null; then
"${HERE}/gtk-dialog.py" error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
else
printf "${ERROR_MESSAGE}\n"
fi
exit 1
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
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
elif "${HERE}/gtk-dialog.py" test > /dev/null; then
"${HERE}/gtk-dialog.py" error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
else
printf "${ERROR_MESSAGE}\n"
fi
exit 1
fi

View File

@@ -5,7 +5,7 @@ cd "{GAME_INSTALL_DIR}"
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
JOIN_SERVER=""
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
fi
# 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
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"
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
else
printf "${ERROR_MESSAGE}\n"
fi
exit 1
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
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
else
printf "${ERROR_MESSAGE}\n"
fi
exit 1
fi

View File

@@ -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
if [ -n "${OPENRA_ORIG_MONO_PATH}" ]; then
export MONO_PATH="${OPENRA_ORIG_MONO_PATH}"
export MONO_PATH="${OPENRA_ORIG_MONO_PATH}"
fi
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
if [ -n "${OPENRA_ORIG_MONO_CONFIG}" ]; then
export MONO_CONFIG="${OPENRA_ORIG_MONO_CONFIG}"
export MONO_CONFIG="${OPENRA_ORIG_MONO_CONFIG}"
fi
unset SDL_VIDEO_X11_WMCLASS OPENRA_ORIG_MONO_PATH OPENRA_ORIG_MONO_CFG_DIR OPENRA_ORIG_MONO_CONFIG

View File

@@ -2,8 +2,8 @@
# OpenRA master packaging script
if [ $# -ne "2" ]; then
echo "Usage: ${0##*/} version outputdir."
exit 1
echo "Usage: ${0##*/} version outputdir."
exit 1
fi
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
function build_package() (
function on_build() {
echo "$1 package build failed." 1>&2
}
#trap function executes on any error in the following commands
trap "on_build $1" ERR
set -e
echo "Building $1 package(s)."
cd "$1"
./buildpackage.sh "${GIT_TAG}" "${BUILD_OUTPUT_DIR}"
function on_build() {
echo "$1 package build failed." 1>&2
}
#trap function executes on any error in the following commands
trap "on_build $1" ERR
set -e
echo "Building $1 package(s)."
cd "$1"
./buildpackage.sh "${GIT_TAG}" "${BUILD_OUTPUT_DIR}"
)
#exit on any non-zero exited (failed) command

View File

@@ -2,8 +2,8 @@
# OpenRA packaging script for versioned source tarball
if [ $# -ne "2" ]; then
echo "Usage: $(basename "$0") tag outputdir"
exit 1
echo "Usage: $(basename "$0") tag outputdir"
exit 1
fi
# Set the working dir to the location of this script