[Tor www-team] Seeking Bash Scripting Experience for a Setup Script

William Papper william at papper.me
Wed May 21 03:53:18 UTC 2014


Hi Remco,

Thank you! This is fantastic. Do you want to create a pull request? Feel
free to add yourself to the "Who built this project?" section of the README
also.

I got a few errors when I ran the script (Ubuntu 14.04 LTS), but they seem
rather small. The script still completed successfully, in any event. I've
opened an issue on GitHub for that here:
https://github.com/wpapper/tor-download-web/issues/60

Using a template makes a lot of sense and seems like a very good solution.
We could do the same for the fallback (for non-JS) links in index.html, too.

Thanks again! This is great progress.

Sincerely,
Will Papper


On Tue, May 20, 2014 at 11:38 AM, Remco <remco at verhoef.name> wrote:

> Hi William,
>
> I've updated the script:
>
> curl
> https://raw.githubusercontent.com/dutchcoders/tor-download-web/master/setup.sh |
> sh
>
> You can install it using curl & executing it directly. (this is not per se
> always safe, but is being used often for convenience)
>
> Only thing left (I believe) is updating the script files. We can do this
> for example using a thank-you.js.template being seddet to thank-you.js.
> This way it won't interfer with current downloads or broken links.
>
> Remco
>
>
>
> On Sun, May 18, 2014 at 8:47 PM, William Papper <william at papper.me> wrote:
>
>> I've moved the version numbers into a single variable (
>> https://github.com/wpapper/tor-download-web/commit/e73c3cc0e5af4055692ed47c19baad9510dfa073),
>> which should make the script much easier to work with. Does this help?
>>
>> Also, would it be possible for the script to run both git pull and rsync?
>> That way, we can update the web page and the files at the same time.
>>
>> Thanks again!
>>
>>
>> On Sun, May 18, 2014 at 12:39 PM, William Papper <william at papper.me>wrote:
>>
>>> Hi Remco,
>>>
>>> Thank you for your work! This is great.
>>>
>>> You're correct about the updating. It should update the files
>>> automatically through cron, even if we haven't updated the git repo.
>>>
>>> Relative paths are completely fine. My thinking was that the
>>> torproject.org URLs in thank-you.js could be replaced with relative
>>> paths using something like sed, but of course you can use whatever you'd
>>> like.
>>>
>>> Could you expand on your version proposal? Are you marking the version
>>> number in the HTML/JS? Instead, I could add a "version" variable to
>>> thank-you.js (which would be used instead of "3.6.1" in wintbb, wintbbsig,
>>> etc), so that only the variable and the paths need to be updated. Does that
>>> seem like a good route to take?
>>>
>>> Sincerely,
>>> Will Papper
>>>
>>>
>>> On Sun, May 18, 2014 at 12:28 PM, Remco <remco at verhoef.name> wrote:
>>>
>>>> Hi William,
>>>>
>>>> I've created a fork, and updated the script. It isn't completely
>>>> working yet, but want to discuss the requirement of updating the js.
>>>>
>>>> https://github.com/dutchcoders/tor-download-web/blob/master/setup.sh
>>>>
>>>> If I understand correctly, you want the tor browser bundle to update
>>>> individual compared to the tor download web? I'm having a little issue with
>>>> updating the javascript file. Only way I can do this is by asking some
>>>> questions when running the script, as what will be the url the downlad web
>>>> will be running at. Other solution is to have relative paths in the
>>>> download js, so we only have to update to the correct version. I propose to
>>>> have some kind of tags (e.g. <!--VERSION--><!--ENDVERSION--> for showing
>>>> version numbers in HTML, /*VERSION*//*ENDVERSION*/ for javascript, think
>>>> this won't be necessary) for having actual versions updated.
>>>>
>>>> Any suggestions / additions?
>>>>
>>>> Otherwise I'll finish the script this way.
>>>>
>>>> Regards,
>>>>
>>>> Remco
>>>>
>>>>
>>>>
>>>> On Sat, May 17, 2014 at 1:02 AM, William Papper <william at papper.me>wrote:
>>>>
>>>>> Thank you, Remco.
>>>>>
>>>>> We're seeking to create a script which allows each instance of the
>>>>> download site to be turned into a mirror. Ideally, someone can use git
>>>>> clone, run setup.sh, and have a working download mirror fully configured.
>>>>>
>>>>> setup.sh should:
>>>>> 1. Pull the contents of Tor’s website mirror (or even just
>>>>> dist/torbrowser if possible, since that's all we need)
>>>>>
>>>>> 2.Check the GPG keys to make sure that nothing has been modified
>>>>>
>>>>> 3. Move the download files into a mirror directory and update the URLs
>>>>> found in thank-you.js
>>>>>
>>>>> 4. Ensure that the mirror and the git repo will auto update using cron
>>>>> and will work across version numbers
>>>>>
>>>>> The current script in the repository has a rough sketch of what I was
>>>>> going for.
>>>>>
>>>>> Thanks for your help! Open up a pull request whenever you're ready.
>>>>> Feel free to ask us if you have any questions.
>>>>> On May 16, 2014 2:56 AM, "Remco" <remco at verhoef.name> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm happy to help with the bash script. Just let me know what you
>>>>>> exactly want.
>>>>>>
>>>>>> Remco
>>>>>>
>>>>>>
>>>>>> On Fri, May 16, 2014 at 5:51 AM, William Papper <william at papper.me>wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Do any of you have experience with Bash scripting for Linux/BSD? We
>>>>>>> added a stub for a setup script to tor-download-web<https://github.com/wpapper/tor-download-web>
>>>>>>>
>>>>>>> . The script will allow the project to create a download mirror from
>>>>>>> the contents of Tor's website mirror<https://www.torproject.org/docs/running-a-mirror.html.en>
>>>>>>>
>>>>>>> .
>>>>>>>
>>>>>>> The current version of the script (with some pseudocode) is here<https://github.com/wpapper/tor-download-web/blob/master/setup.sh>
>>>>>>>
>>>>>>> , but it is quite basic since I have very little experience with
>>>>>>> Bash scripting.
>>>>>>>
>>>>>>> Would someone who knows Bash be willing to create the setup script?
>>>>>>> This should be a very quick job for someone with experience, and it would
>>>>>>> be incredibly helpful. Thanks for your help!
>>>>>>>
>>>>>>> Sincerely,
>>>>>>> Will Papper
>>>>>>>
>>>>>>>
>>>>>>> ________________________________________________________________________
>>>>>>> Tor Website Team coordination mailing-list
>>>>>>>
>>>>>>> To unsubscribe or change other options, please visit:
>>>>>>> https://lists.torproject.org/cgi-bin/mailman/listinfo/www-team
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ________________________________________________________________________
>>>>>> Tor Website Team coordination mailing-list
>>>>>>
>>>>>> To unsubscribe or change other options, please visit:
>>>>>> https://lists.torproject.org/cgi-bin/mailman/listinfo/www-team
>>>>>>
>>>>>>
>>>>>
>>>>> ________________________________________________________________________
>>>>> Tor Website Team coordination mailing-list
>>>>>
>>>>> To unsubscribe or change other options, please visit:
>>>>> https://lists.torproject.org/cgi-bin/mailman/listinfo/www-team
>>>>>
>>>>>
>>>>
>>>> ________________________________________________________________________
>>>> Tor Website Team coordination mailing-list
>>>>
>>>> To unsubscribe or change other options, please visit:
>>>> https://lists.torproject.org/cgi-bin/mailman/listinfo/www-team
>>>>
>>>>
>>>
>>
>> ________________________________________________________________________
>> Tor Website Team coordination mailing-list
>>
>> To unsubscribe or change other options, please visit:
>> https://lists.torproject.org/cgi-bin/mailman/listinfo/www-team
>>
>>
>
> ________________________________________________________________________
> Tor Website Team coordination mailing-list
>
> To unsubscribe or change other options, please visit:
> https://lists.torproject.org/cgi-bin/mailman/listinfo/www-team
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/www-team/attachments/20140520/0dd76d6e/attachment.html>


More information about the www-team mailing list