onsdag 4 februari 2015

Linux - Bash the depdl h-downloader

#!/bin/bash
clear
clear
echo "                                                         "
echo "                                                         "
echo "                          ''~''                          "
echo "                         ( o o )                         "
echo " +------------------.oooO--(_)--Oooo.------------------+ "
echo " |                                                     |           "
echo " |     LINUX..                           BASH...         | "
echo " |                      .oooO                                 | "
echo " |                    (   )   Oooo.                           | "
echo " +---------------------\ (----(   )--------------------+ "
echo "                        \_)    ) /                       "
echo "                              (_/                        "
echo "           http://verklighetochdrom.blogspot.se/         "           
echo "                                                         "
echo "                  hynt@speed-mailer.com                  "
echo "                                                                           "
#Testar om apt-cache är installerat om inte installeras programet
dpkg -s apt-cacher-ng 2>/dev/null >/dev/null || aptitude install apt-cacher-ng

#Testar om aptitude är installerat om inte install programet
dpkg -s aptitude 2>/dev/null >/dev/null || apt-get install aptitude

echo "the depdl h-downloader"
echo "--------------------"
echo "Packagename:"
read val1
sudo apt-get --print-uris --yes install $val1 | grep ^\' | cut -d\' -f2 >packagedownload.txt
wget --input-file packagedownload.txt
    

Inga kommentarer: