Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 675165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:47:17+00:00 2026-05-14T00:47:17+00:00

I have a project that depends upon some other binaries to be downloaded from

  • 0

I have a project that depends upon some other binaries to be downloaded from web at install time.For this what i do is:

if ( file-present-in-src/)
    # skip that file
else
    # use wget to download the file

The problem with this approach is that when I interrupt a download in middle, and do invoke the script next time, the partially downloaded file is also skipped (which is not desired), also I want wget to resume the download of the partially downloaded file.

How should I go about it:
Possible Solutions I could think of:

  1. Let the file to be downloaded to some file say download_tmp. Move to original file
    if successful.
  2. Handle SIG{‘INT’} to write proper cleanup code.

But none of these could help resume the partial file download,

Any insights?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:47:17+00:00Added an answer on May 14, 2026 at 12:47 am

    Fist, I don’t understand what this has to do with Perl, since you’re using wget to do the dowloading … You could use libwww-perl (perldoc LWP) and have more control about the download process.

    Then I second your idea of downloading to a “tmp” filename and move the file on success.

    However I think you need to go further and verify the integrity of the files. Doing an MD5 or SHA hash is very easy, and match the downloaded one with what you’re expecting. You can have a short file on server containing the checksum (filename.md5). Determine success only when you have a match.

    Note that catching all the signals and generally trying to make the process unkillable, and then expecting it to have worked is bound to fail at one point or another. There could be a network timeout, a crash, power failure, configuration problem on the server … you should instead assume downloads can fail, because they will, and code so that your process can recover.

    Finally you’re not telling us what kind of binaries you’re downloading and what you’re doing with them. Since you use wget I’m going to assume you’re on Unix; you should consider using RPM+Yum or the likes, they handle all this for you. RPM are easy to write, really.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have java project that depends from other java projects. These projects are maven
Suppose, I have an opensource project that depends on some library, that must be
I have a project that comprises pre-build Dll modules, built some time in the
I have a project that needs to disable/enable some NSToolbarItem s depends on different
I have a project that depends on JBoss(specifically 5.1.0.GA) and I was playing around
I have an Setup project that installs App.exe. App.exe depends on 1) A third
I have a project A that depends on project B that depends on project
I have a project that depends on a library that is only easily available
I am using Qt Creator and have a Qt GUI project that depends on
I have two Eclipse projects: one that depends upon a certain library (android.jar) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.