[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Inf-IT DAVcl] cash_update.sh


Hi Werner,

thanks for the patch (I hope it helps someone).

The main problem with sed and perl (used previously) is that there are different versions of these tools in Linux/Unix/Mac often with different switches. That was the reason why I replaced the previously used perl and currently use ed (which is the only command working across all OSes).

Anyway the HTML5 cache is now deprecated (see the console.log e.g. in Chrome) and need to be replaced by web workers - so the cache_update.sh will be removed in future version of InfCloud.


Cheers,


JM


> On 20 Sep 2018, at 20:13, Werner Joss <werner@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> Hello all,
> I'm new to davclients - today I discovered InfCloud and decided to install it on my webhosting as a web frontend to my baikal server.
> and, after some RTFM and fiddling with the config, it works just great.
> so, thanks for this useful software !
> 
> one thing I stumbeled upon, however, was the cache update script:
> it relies on the editor ed, which is not installed on my webhosting (and I can't install anything there).
> but, as I saw, sed is installed, so why not use that, if ed fails ?
> so, here is my version of cache_update.sh:
> 
> #! /bin/bash
> # Use this script every time you modify any file to force browsers to reload it (empty HTML5 cache).
> 
> command -v ed &> /dev/null || { echo "Error: 'ed' not installed. trying sed ..." > /dev/stderr; noed=1; }
> if [ -z $noed ];then
>        printf ",s/#V.*/#V $(date '+%Y%m%d%H%M%S')/\nw\nq\n" | ed -s cache.manifest
>        exit
> fi
> 
> command -v sed &> /dev/null || { echo "Error: 'sed' not installed. Aborting." > /dev/stderr; exit 1; }
> newd=$(date '+%Y%m%d%H%M%S')
> sed -i 's/#V.*/#V '$newd'/' cache.manifest
> 
> maybe someone else can use it ?
> greetings
> Werner
> 
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Follow-Ups:
Re: [Inf-IT DAVcl] cash_update.shWerner Joss <werner@xxxxxxxxxxxxxxxxxxxxx>
References:
[Inf-IT DAVcl] cash_update.shWerner Joss <werner@xxxxxxxxxxxxxxxxxxxxx>