]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
gamepack-manager: Makefile honors shebang
authorThomas Debesse <dev@illwieckz.net>
Sun, 19 May 2019 22:41:04 +0000 (00:41 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 1 Jun 2019 15:23:48 +0000 (17:23 +0200)
and properly create directories when called from Makefile

Makefile
gamepack-manager

index 51d97220060e3a61c0a4773f6753073c65d70b27..e7f5b725c3e268e1c171a520872ef0844366c443 100644 (file)
--- 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
index 7d98820d6d7850bcbb77b36cb342009232b30163..aa42745583211e5d5ffeaafdbc4509d270049aaf 100755 (executable)
@@ -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}" ]