Advertisement
Guest User

Untitled

a guest
Apr 15th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.66 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  red() { echo "$(tput setaf 1)$*$(tput setaf 9)"; }
  4.  green() { echo "$(tput setaf 2)$*$(tput setaf 9)"; }
  5.  yellow() { echo "$(tput setaf 3)$*$(tput setaf 9)"; }
  6.  blue() { echo "$(tput setaf 4)$*$(tput setaf 9)"; }
  7.  
  8.  notinstalled=$(red " ✗ not installed\n")
  9.   installed=$(green " ✔ installed\n")
  10.  
  11.    reset
  12.     blue "---------------------------------"
  13.   yellow " Installed Or Not!               "
  14.     blue "----add-Packages-to-packages.txt-"
  15. for cmd in `cat packages.txt` ; do
  16.   printf "%-10s" "$cmd"
  17.  if hash "$cmd" 2> /dev/null ; then printf "${installed}" ; else printf "${notinstalled}" ; fi
  18.  done
  19.     blue "-hynten@speed-mailer.com---------"
  20. echo " "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement