Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. if [ -f /path/to/real-script ] ; then
  4. # Local copy exists, download only if remote file is newer
  5. curl -z /path/to/real-script -o /path/to/real-script http://www.example.com/real-script
  6. else
  7. # Local copy does not exist, always download
  8. curl -o /path/to/real-script http://www.example.com/real-script
  9. fi
  10. chmod 755 /path/to/real-script
  11. exec /path/to/real-script "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement