From: Thomas Debesse Date: Sun, 19 May 2019 22:41:04 +0000 (+0200) Subject: gamepack-manager: Makefile honors shebang X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=147812e69baedfb10a00e3d7222d93fa40e98736;p=xonotic%2Fnetradiant.git gamepack-manager: Makefile honors shebang and properly create directories when called from Makefile --- diff --git a/Makefile b/Makefile index 51d97220..e7f5b725 100644 --- a/Makefile +++ b/Makefile @@ -1055,8 +1055,7 @@ $(INSTALLDIR)/heretic2/h2data.$(EXE): \ .PHONY: install-data install-data: binaries - $(MKDIR) $(INSTALLDIR)/games - DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" DOWNLOADDIR="$(DOWNLOADDIR)" INSTALLDIR="$(INSTALLDIR)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) gamepack-manager + DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" DOWNLOADDIR="$(DOWNLOADDIR)" INSTALLDIR="$(INSTALLDIR)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" CP="$(CP)" CP_R="$(CP_R)" ./gamepack-manager $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR $(ECHO) $(RADIANT_PATCH_VERSION) > $(INSTALLDIR)/RADIANT_PATCH diff --git a/gamepack-manager b/gamepack-manager index 7d98820d..aa427455 100755 --- a/gamepack-manager +++ b/gamepack-manager @@ -621,12 +621,24 @@ done # compatibility with legacy Makefile if [ "${DOWNLOAD_GAMEPACKS}" = 'yes' ] then - ! [ -z "${DOWNLOADDIR}" ] && download_dir="${DOWNLOADDIR}" - ! [ -z "${INSTALLDIR}" ] && install_dir="${INSTALDIR}" + if ! [ -z "${DOWNLOADDIR}" ] + then + download_dir="${DOWNLOADDIR}" + fi + + if ! [ -z "${INSTALLDIR}" ] + then + install_dir="${INSTALLDIR}" + fi + license_list='free' by_license='true' + download_packs='true' + mkdir_download='true' + install_packs='true' + mkdir_install='true' fi if [ -z "${download_dir}" ]