zxdos / zxuno

All the files for ZX-Uno project repository
112 stars 31 forks source link

Do we need `SD.zip` as an archived copy of `SD` directory? #47

Closed ghost closed 3 years ago

ghost commented 3 years ago

There are no references to this file in manuals.

ghost commented 3 years ago

The content of SD.zip is different from that one in SD directory. The command diff -qr SD.zip/ SD/ shows:

Only in SD/BIN: BACKUP
Only in SD/BIN: CORCLEAN
Only in SD/BIN: COREBIOS
Only in SD/BIN: UPGRADE
Only in SD.zip/SYS: AUTOBOOT.BAS
Files SD.zip/SYS/CONFIG/ESXDOS.CFG and SD/SYS/CONFIG/ESXDOS.CFG differ
Files SD.zip/SYS/CONFIG/TRDOS.CFG and SD/SYS/CONFIG/TRDOS.CFG differ
Only in SD.zip/SYS: CUSTOM
Only in SD.zip/SYS: CUSTOM.ASM
Only in SD.zip/SYS: CUSTOM.ZDSP
Only in SD.zip/SYS: NMI.INC
Only in SD.zip/SYS: NMI.PUBLICS
Only in SD.zip/SYS: README.TXT
ghost commented 3 years ago

(SYS/CONFIG/*.CFG files are equal except line endings). Should extra files be extracted from SD.zip back into SD directory? This will ease the update script if it needed (by the way it's already written, but not uploaded because of these differences)

ghost commented 3 years ago

Part of Makefile to test for an auto-update of SD.zip file process:

# update-SD.zip

# Update only if structure or content of files are different. Timestamps are ignored.
# Temporary files, directories:
#   SD.old/ .SD_old_created .SD_differs .SD_done SD_new.zip

.PHONY: update-SD.zip
update-SD.zip: .SD_done
    rm -f $<

.SD_done: .SD_old_created
    rm -f .SD_differs
    diff -r SD.old SD >/dev/null || if test $$? -eq 1; then touch .SD_differs; else echo 'diff failed!'; false; fi
    rm -f $<
    rm -rf SD.old
    if test -f .SD_differs; then cd SD && zip -9qr ../SD_new.zip .; fi
    if test -f SD_new.zip; then mv SD_new.zip SD.zip; fi
    rm -f .SD_differs
    touch $@

.SD_old_created:
    rm -rf SD.old
    mkdir SD.old
    if test -f SD.zip; then unzip -nqd SD.old SD.zip; fi
    touch $@

.PHONY: clean-update-SD.zip
clean-update-SD.zip:
    rm -f .SD_old_created .SD_differs .SD_done SD_new.zip
    rm -rf SD.old

Update: make update-SD.zip Clean: make clean-update-SD.zip

antoniovillena commented 3 years ago

Yes. I think we must offer this redundant file because there is not easier alternative to people to download a folder from github

kounch commented 3 years ago

How about using a release? When creating one, you can attach other files apart from the automatic archival of the source code.

antoniovillena commented 3 years ago

Ok. It's good to me using a release

ghost commented 3 years ago

Closed by bef7bd98d6d15be62f478c18a2e32bdf407b0161