Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created February 27, 2015 13:43
Show Gist options
  • Select an option

  • Save emilisto/f8738981fcc1c51e94d2 to your computer and use it in GitHub Desktop.

Select an option

Save emilisto/f8738981fcc1c51e94d2 to your computer and use it in GitHub Desktop.
Wrapper for `apt-get install` that runs apt-get update if any download returns 404
#!/bin/bash
COMMAND="DEBIAN_FRONTEND=noninteractive apt-get install -qy $@"
eval $COMMAND || (apt-get update && eval $COMMAND)
@joch
Copy link
Copy Markdown

joch commented Mar 2, 2015

Did it... work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment