mirror of
https://src.koozali.org/smeserver/common.git
synced 2024-12-25 20:27:01 +01:00
recreate archive if git cmd available (not Buildsys) and if archive not in git
This commit is contained in:
parent
9fbbedec84
commit
7fc85f24aa
@ -250,16 +250,20 @@ endif
|
||||
|
||||
# Create the .tar.gz or whatever file
|
||||
$(ARCHIVEFILE):
|
||||
ifneq (, $(shell which git))
|
||||
$(info create or update ${ARCHIVEFILE} archive)
|
||||
@mkdir -p "${TEMPDIR}/${TREEPATH}" ;\
|
||||
if [ -d ${CODEDIR} ] ; then cp -R "${CODEDIR}" "${TEMPDIR}/${TREEPATH}" ; fi ; \
|
||||
if [ -e createlinks ] ; then cp createlinks "${TEMPDIR}/${TREEPATH}/." ; fi ; \
|
||||
if [ -d additional ] ; then cp -r additional/* "${TEMPDIR}/${TREEPATH}/." ; fi ; \
|
||||
find "${TEMPDIR}/${TREEPATH}/." -type f -name ".gitignore" -delete ; \
|
||||
rm -f ${ARCHIVEFILE} ;\
|
||||
tar -caf "${ARCHIVEFILE}" -C "${TEMPDIR}" "${TREEPATH}" ;\
|
||||
git ls-files --error-unmatch ${ARCHIVEFILE} 2>/dev/null || rm -f ${ARCHIVEFILE} ;\
|
||||
git ls-files --error-unmatch ${ARCHIVEFILE} 2>/dev/null || tar -caf "${ARCHIVEFILE}" -C "${TEMPDIR}" "${TREEPATH}" ;\
|
||||
ls -l ${ARCHIVEFILE} ;\
|
||||
rm -Rf "${TEMPDIR}/${TREEPATH}/"
|
||||
else
|
||||
$(info git not available, keeping archive ${ARCHIVEFILE} as is (buildsystem mock?))
|
||||
endif
|
||||
|
||||
test-srpm: srpm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user