Fixing several ShellCheck warnings

This commit is contained in:
Brenton Horne
2018-11-20 04:33:28 +10:00
committed by Paul Chote
parent 807a40c209
commit 2d4d6cdc1b
12 changed files with 43 additions and 43 deletions

View File

@@ -12,12 +12,12 @@ fi
LAUNCHER_TAG="osx-launcher-20171118"
if [ $# -ne "2" ]; then
echo "Usage: `basename $0` tag outputdir"
echo "Usage: $(basename "$0") tag outputdir"
exit 1
fi
# Set the working dir to the location of this script
cd $(dirname $0)
cd "$(dirname "$0")" || exit 1
TAG="$1"
OUTPUTDIR="$2"
@@ -44,10 +44,10 @@ populate_template() {
# Deletes from the first argument's mod dirs all the later arguments
delete_mods() {
pushd "${BUILTDIR}/${1}/Contents/Resources/mods" > /dev/null
pushd "${BUILTDIR}/${1}/Contents/Resources/mods" > /dev/null || exit 1
shift
rm -rf $@
pushd > /dev/null
rm -rf "$@"
pushd > /dev/null || exit 1
}
echo "Building launchers"
@@ -70,12 +70,12 @@ modify_plist "{DEV_VERSION}" "${TAG}" "${BUILTDIR}/OpenRA.app/Contents/Info.plis
modify_plist "{FAQ_URL}" "http://wiki.openra.net/FAQ" "${BUILTDIR}/OpenRA.app/Contents/Info.plist"
echo "Building core files"
pushd ${SRCDIR} > /dev/null
pushd "${SRCDIR}" > /dev/null || exit 1
make osx-dependencies
make core SDK="-sdk:4.5"
make version VERSION="${TAG}"
make install-core gameinstalldir="/Contents/Resources/" DESTDIR="${BUILTDIR}/OpenRA.app"
popd > /dev/null
popd > /dev/null || exit 1
curl -s -L -O https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md
markdown Changelog.md > "${BUILTDIR}/OpenRA.app/Contents/Resources/CHANGELOG.html"
@@ -106,10 +106,10 @@ else
curl -s -L -O https://github.com/OpenRA/libdmg-hfsplus/archive/master.zip || exit 3
unzip -qq master.zip
rm master.zip
pushd libdmg-hfsplus-master > /dev/null
pushd libdmg-hfsplus-master > /dev/null || exit 1
cmake . > /dev/null
make > /dev/null
popd > /dev/null
popd > /dev/null || exit 1
if [[ ! -f libdmg-hfsplus-master/dmg/dmg ]] ; then
echo "libdmg-hfsplus compilation failed"