Results 1 to 7 of 7

Thread: Script that downloads file, unpacks it

  1. #1

    Default Script that downloads file, unpacks it

    I'm testing the newest builds of google chrome, and i wonder if anyone would know how to make a script that would start every 5 minutes and download latest build? The folder goes only up and i have no idea how to make such variable that would either check what is the latest one or download the latest one?

    The website is

    Index of /buildbot/snapshots/chromium-rel-linux
    How does a linux geek make love??

    - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep;

  2. #2

    Default Re: Script that downloads file, unpacks it

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Assuming the chrome-linux.zip file never changes name it can be extremely
    elegant:

    wget -r
    http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/`curl
    http://build.chromium.org/buildbot/s...l-linux/LATEST
    2>/dev/null`/chrome-linux.zip

    That is all on one line, by the way. You could then have something
    actually go into the resulting directory and extract the zip file. The
    part I haven't worked out is how to actually pull the file list out of the
    index.html returned by a request for the directory, but if
    chrome-linux.zip doesn't change then it's not worth my tame to make it
    multiple lines.

    Create a cron job to run every five minutes. As your user, run crontab -e
    and then create the following as the entry:


    */5 * * * * wget --directory-prefix=/path/to/output/directory -r
    http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/`curl
    http://build.chromium.org/buildbot/s...l-linux/LATEST
    2>/dev/null`/chrome-linux.zip

    Again, all on one line. Make sure your user has rights to create stuff in
    /path/to/output/directory ahead of time.

    Good luck.





    BenderBendingRodriguez wrote:
    > I'm testing the newest builds of google chrome, and i wonder if anyone
    > would know how to make a script that would start every 5 minutes and
    > download latest build? The folder goes only up and i have no idea how to
    > make such variable that would either check what is the latest one or
    > download the latest one?
    >
    > The website is
    >
    > 'Index of /buildbot/snapshots/chromium-rel-linux'
    > (http://build.chromium.org/buildbot/s...ium-rel-linux/)
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJKc3U9AAoJEF+XTK08PnB55z8QAJRKNkRIOGySVM25BEwD3Bkg
    /0ElCzhr8NbqePGKAZtoQ/dtpAw/wJwKxGIiD5/Z55TPJ5ZCGvxUj0hN6TDYo/Pf
    MYAGF1/XVuho/3YCvmmDSNg6rQgVwwzio9r5v0jJyMwqfTF9+rp76tUT3jIDkaT9
    xwHwRE4Tt1LnSKMeeu+AMPB3nBGK8du6MrxBn+5LM//viy5S3wPJCujrA2mRATMP
    FwpuIF1QFKz+UMeKOqx2gftec6CjGkaDK5Pbj7ZfPgnGiQzfTpDj/hmvIcENm0P+
    g013TiGdhXTfr2v4LcGWq35LQJ/WziAhpOaKROnVUItTeFEXZI7/CfcGeX2kasKI
    g2SBqV970w2CnVdUM3+OE/dedp3SGHVyvUKbvNgsVZWGaaEDhdNDQU4/x7T4LXkV
    Ar4gZbAOjFxpdTBQ/XheIPif59jTgfBUtu3ff4Vs/MaEBBSQ+amzuvVdniLiCUKt
    dZrjaxHlzuZrwcZF1SuXudtCATS1h6uaekLGdkpkPe5kuR4kfk0S6PZHBTuiq8so
    +mGpUP6u/w7bN79U22N7AgLbdwBuJYHOtbjzt5A/1DWeqTcyOcrLvS+EuzzS8xJI
    y8L3sN08ty8uE+MWnobtdAH2HlC8j4urX5ZIuJI/zysSdKvA412kR58AHUI+Q3ro
    +/KlM2/hgMe2V4/epqNu
    =BwlN
    -----END PGP SIGNATURE-----

  3. #3

    Default Re: Script that downloads file, unpacks it

    Thanks!!!! I was wondering what is this LATEST link for Now i can keep up with the latest and greatest chromium MANY MANY THANKS!!!!

    By the way, i could make whole script and put it in the cron directory?
    How does a linux geek make love??

    - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep;

  4. #4

    Default Re: Script that downloads file, unpacks it

    Now that i know it downloads how can i send the output of LATEST whatever it is ? I want to make a variable and the LATEST output will be that so how could i make that?

    What i mean is blablabla/22123 then i want to make a script that would save it in a neutral directory otherwise i will end up with many chrome-linux.zip files each in its own directory and i want it to be saved ALWAYS in the same folder no matter what is the LATEST.

    P.S. Ok, i made it like that

    wget -r http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/`curl http://build.chromium.org/buildbot/s...l-linux/LATEST 2>/dev/null`/chrome-linux.zip > /home/piotrek/Programs/CHROME/chrome-linux.zip

    P.S.2 Thank You very much once again, may the force be with You.
    How does a linux geek make love??

    - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep;

  5. #5

    Default Re: Script that downloads file, unpacks it

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    You could put it in a cron directory, though no cron directory is called
    every five minutes. Making a script and dropping it in /etc/cron.hourly
    may make sense though (getting a new build every five minutes is a little
    crazy, methinks).

    Good luck.





    BenderBendingRodriguez wrote:
    > Thanks!!!! I was wondering what is this LATEST link for Now i can
    > keep up with the latest and greatest chromium MANY MANY THANKS!!!!
    >
    > By the way, i could make whole script and put it in the cron directory?
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJKc4hOAAoJEF+XTK08PnB5di8QAIYSTSdR5wkUZs9RFrXLUDuS
    9XJU7VSki4nhC3Qe731yF7CvmgkBihRl3thfFLUBoDu2Ds3Z1947I2VjW15/VHOU
    Ssu9wOADnLq9CtENibfNkBeA1a2j31kHe/SbtVI4LbFEnuwm1oeRramMl9FSGQ7X
    pLnAZa7SyHw1jHeBsbO4TD30pIzVEPZd2dOSJgtF1VJTgE0L4hJ8e4hHPuJCPVQF
    LYpnaL9Y18SJJRmSG1i4Z+CKxyWrWBJKpDDKDO+q1YVTwRBBN7URR0w/2cMa/rMr
    Z0fnSy73EwRbqTOMouOJeeCHm07XIvLJdRskVcFiLi4Twu66Bgx0zOHmnXBBLxE1
    TsqfL9PYB+Br7v6ts+5UJFbZibW0eaXWq4r5suTwINibOTrBrEemgbj6S4+KKo7z
    wLkgm6YAG1tMcBqIWuJyETkA6emxvTA4/zSjkjW91tnnxcG32FpkLd43FZhvEzsS
    X+TlXUlSF2tzoauQoNDXPU0Z0Vrgm/1cFS+8vCDcktN2wjyNv/DDtUTUBPaOYB36
    njA8UxZ6Rx2UAWVpROoYVLSQt7J2cUq864zSex9UfuAO2FrvsU9kS0ElDjut/xkE
    TU8wisxpHPOkVkvIIv40dHRcsV+98imKpnklSGFqhvB6csR8vDRT8js9PcYkzZD7
    45hzqz+DwQCeYaC68TXG
    =1uYE
    -----END PGP SIGNATURE-----

  6. #6

    Default Re: Script that downloads file, unpacks it

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    man wget

    Good luck.





    BenderBendingRodriguez wrote:
    > Now that i know it downloads how can i send the output of LATEST
    > whatever it is ? I want to make a variable and the LATEST output will be
    > that so how could i make that?
    >
    > What i mean is blablabla/22123 then i want to make a script that would
    > save it in a neutral directory otherwise i will end up with many
    > chrome-linux.zip files each in its own directory and i want it to be
    > saved ALWAYS in the same folder no matter what is the LATEST.
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJKc4hmAAoJEF+XTK08PnB5YA4QAMbPa7TF4Qnb76O6PeeQGxFf
    o56RLvMmVm59HG6IerkZF7FbiLSD+w63/RTHut/zI8IN0XTLjsG6RRGzyihOXsv2
    +Zgty/XUwKb538cUQ5YsE0eNBkzp1n5dsf/IbWp924Y8FWsuB0aXYReYv5IJH1WU
    RIyd+7ji1XWaMMh2jIQt2/wQShRRBEplXvQUJsKeQKHOhKpjXzroVXuhWfiqQBYF
    ilkdi0Xe6sXPuXJcQu7Pf3kVs9NPUgWlkhim41Lk6icP01UoF3Fc4lvIaQymk+t8
    xKomnbRPlvBIWMCHlWaWPhgqfkqmgLuDz8B0H+/GK6AN952no3nqgd/Tb/SAIq0L
    psUngDwMdtVr8t9DKiaXdFI+bZW2KxSnTSxal14okRkxOEI6F08iUaT6pjbbBlLF
    1pW91Ewbe0+8ICdX7MeB4hQJ+OBwLjEUCuhP5unNN96DGeMTgxFjO5mDzNfYvKFY
    UGjnBDpxtlhJ/pVgFkfbj78LxaACvsj8F6AweL0evXOzCDsZfBlNkXakNKQGf4HM
    VzQnuaebrm8L1TtobjszvZdkE2PfVy+lTfwyaWQCw3011/S4kiEFrSuE0eTy7SHv
    poZnNdFmZF90EhpPDaxAYPAVe1UHJHFlFrbsBY5GHXMBQhIc7+j3Qd5H56XPSYGH
    puHD8+/FAa3xISQZAzLN
    =iT6J
    -----END PGP SIGNATURE-----

  7. #7

    Default Re: Script that downloads file, unpacks it

    Thank You for all your help. I managed to decipher that command So right now my script (with ALL your help

    Downloads latest build, kills existing google-chrome process, clean the old directory, extracts the new files to specific directory and restores google-chrome
    How does a linux geek make love??

    - rtfm; unzip; strip; touch; finger; mount; fsck; more; yes; umount; zip; sleep;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •