Makefile: improve archives and add static-o9 one
* Adds --directory argument for tar to only gives ils directory in final archive * Adds new archive: static-o9.tar.gz * Transforms CSS files: change URL from resources.rero.ch to resources.rero.ch/ils/tests Co-Authored-by: Olivier DOSSMANN <git@dossmann.net>
This commit is contained in:
parent
e566911c6b
commit
cd8c4ee6eb
25
Makefile
25
Makefile
@ -1,23 +1,32 @@
|
|||||||
Q=@
|
Q=@
|
||||||
|
CSS_FILES := $(wildcard ils/css/*.css)
|
||||||
|
|
||||||
all: static.tar.gz static-pilot.tar.gz
|
all: static.tar.gz static-pilot.tar.gz
|
||||||
|
|
||||||
static.tar.gz:
|
static.tar.gz:
|
||||||
$Qmkdir static
|
$Qmkdir static
|
||||||
$Qcp -r ils static/
|
$Qcp -r ils static/
|
||||||
$Qcd static/
|
$Q$(foreach file,${CSS_FILES},sed -i 's#resources\.rero\.ch/ils#resources\.rero\.ch/ils/test#g' "static/$(file)" &)
|
||||||
$Qtar cfz static.tar.gz ils/
|
$Qsleep 1
|
||||||
$Qcd - > /dev/null 2>&1
|
$Qtar cfz static.tar.gz --directory=static/ils/ css images
|
||||||
|
|
||||||
static-pilot.tar.gz: logo-global.pilot.png
|
static-pilot.tar.gz: logo-global.pilot.png
|
||||||
$Qmkdir static-pilot
|
$Qmkdir static-pilot
|
||||||
$Qcp -r ils static-pilot/
|
$Qcp -r ils static-pilot/
|
||||||
$Qcp logo-global.pilot.png static-pilot/ils/images/logo-global.png
|
$Q$(foreach file,${CSS_FILES},sed -i 's#resources\.rero\.ch/ils#resources\.rero\.ch/ils/pilot#g' "static-pilot/$(file)" &)
|
||||||
$Qcd static-pilot/
|
$Qcp -f logo-global.pilot.png static-pilot/ils/images/logo-global.png
|
||||||
$Qtar cfz static-pilot.tar.gz ils/
|
$Qsleep 1
|
||||||
$Qcd - > /dev/null 2>&1
|
$Qtar cfz static-pilot.tar.gz --directory=static-pilot/ils/ css images
|
||||||
|
|
||||||
|
o9: static-o9.tar.gz
|
||||||
|
|
||||||
|
static-o9.tar.gz:
|
||||||
|
$Qmkdir static-o9
|
||||||
|
$Qcp -r ils static-o9/
|
||||||
|
$Q$(foreach file,${CSS_FILES},sed -i 's#resources\.rero\.ch#o9\.re#g' "static-o9/$(file)" &)
|
||||||
|
$Qsleep 1
|
||||||
|
$Qtar cfz static-o9.tar.gz --directory=static-o9/ ils
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$Qrm -rf static/ static-pilot/ static.tar.gz static-pilot.tar.gz
|
$Qrm -rf static/ static-pilot/ static-o9/ *.tar.gz
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user