Skip to content

Instantly share code, notes, and snippets.

@erikfrerejean
Created November 12, 2012 12:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikfrerejean/4059008 to your computer and use it in GitHub Desktop.
Save erikfrerejean/4059008 to your computer and use it in GitHub Desktop.
MODNAME = Some MOD
VERSION = 1.0.0
PACKAGENAME = QuotePostBackLink.zip
PACKAGEFILES = install.xml license.txt modx.prosilver.en.xsl root
CURL = /usr/bin/curl
GIT = /usr/bin/git
.title:
@echo "$(MODNAME) - $(VERSION)\n"
default: .title build
build: getumil getmodx
@echo "Building package"
@zip -r "./$(PACKAGENAME)" $(PACKAGEFILES)
clean:
@$(GIT) clean -fd
mpv: build
@echo "\n\nBuild package and send it to mpv to validate it"
@$(CURL) --form url_request=@"./$(PACKAGENAME)" --form submit=Submit https://www.phpbb.com/mods/mpv/index.php > ./mpv.tmp
@sed 's/^<title>.*/<base href="https:\/\/www.phpbb.com\/"><title>/' ./mpv.tmp > ./mpv.html
-rm ./mpv.tmp
getumil:
@echo "Preparing the umil files"
-rm -rf ./vendor/umil
@$(GIT) clone git://github.com/phpbb/umil.git ./vendor/umil
@cd ./vendor/umil && git fetch origin && $(GIT) checkout v1.0.4
@cp -r ./vendor/umil/umil/root/umil ./root/umil
getmodx:
@echo "Preparing the modx files"
-rm -rf ./vendor/modx
@$(GIT) clone git://github.com/phpbb/modx.git ./vendor/modx
@cd ./vendor/modx && git fetch origin && $(GIT) checkout v1.2.5
cp ./vendor/modx/modx.prosilver.en.xsl ./modx.prosilver.en.xsl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment