thctlo / Kopano

Scripts for Kopano
25 stars 11 forks source link

Simplify script by downloading and sourcing create-kopano-repo.sh #5

Closed fbartels closed 3 years ago

fbartels commented 4 years ago

Hi,

I tried looking into why this script is currently failing, but the script has grown quite complex with all its downloading, moving, removing, backing up, etc.

Have you already thought of refactoring it to make use of https://github.com/zokradonh/kopano-docker/blob/master/base/create-kopano-repo.sh which is used in https://github.com/zokradonh/kopano-docker to build containers with the various download archives provided through kopano.io?

Your script could just wget/curl create-kopano-repo.sh. Maybe do some fingerprinting to detect when there is a newer version and then redownload it? (on second thought this is something that wget also can do natively)

You can see an example script making use of it in https://github.com/zokradonh/kopano-docker/blob/master/base/test.sh or look at https://github.com/zokradonh/kopano-docker/blob/5f10e982a685ea83e2f5965390eabc59f82f2db8/core/Dockerfile#L43-L50 or https://github.com/zokradonh/kopano-docker/blob/5f10e982a685ea83e2f5965390eabc59f82f2db8/webapp/Dockerfile#L48-L62 to see it in action.

The script already has the ability to download for different distributions (see https://github.com/zokradonh/kopano-docker/blob/5f10e982a685ea83e2f5965390eabc59f82f2db8/base/create-kopano-repo.sh#L33-L35).

And on top of that there are quite some automated tests in the linked repo so that it should register early if this particular script throws errors (well at least when using the same distribution as https://github.com/zokradonh/kopano-docker).

Let me know what you think.

thctlo commented 4 years ago

Hai Felix, thank you very much for above, that is sure something we can use. As soon i have the time, i'll dive into it.

thctlo commented 3 years ago

The my new version is online base on zokradonh version. thanks for pointing it out. I didnt see how i could just wget it and use it but new one works fine also now.

im closing this one.