Guest User

Untitled

a guest
Oct 13th, 2016
385
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. dir="/tmp/dpkg-get"
  3. url="$1"
  4. file="${url##*/}"
  5.  
  6. if [ "$EUID" -ne 0 ]
  7. then
  8. echo "Please run as root"
  9. exit
  10. fi
  11.  
  12. [ -d $dir ] || mkdir $dir
  13. wget -q --show-progress -O "$dir/$file" $url && \
  14. dpkg -i "$dir/$file"
RAW Paste Data