Advertisement
Guest User

Untitled

a guest
Apr 15th, 2015
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.57 KB | None | 0 0
  1. #/usr/bin/bash
  2. #/usr/bin/sh
  3. #
  4. # Script: build-deps
  5. # Author: hynten@speed-mailer.com
  6. # Date: 2015-04-16 - 05   (ee = times edited)
  7. #
  8. # Purpose: run apt-cache showsrc and strip Depends
  9. #
  10. # Notes:
  11. #
  12. reset
  13. echo "------------------------------------------"
  14. echo "- BUILD-DEPENDS- hynten@speed-mailer.com -"
  15. echo "-                                        -"
  16. echo "- Strip Depends: from file session.log   -"
  17. echo "-        source: apt-cache showrc        -"
  18. echo "--2015------------------------------------"
  19. echo "                                          "
  20.  echo "Enter Package:"
  21.         read package
  22.  
  23.   sudo apt-cache showsrc $package | grep ^Build-Depends > dep.log
  24.  
  25.  # NOW Strip The Shit of it! ..
  26.   sed -i '/Script started/d' dep.log
  27.   sed -i '/Script done/d' dep.log
  28.   sed -i '/root@/d' dep.log
  29.   sed -i  's/Build-Depends: //g' dep.log
  30.   sed -i  's/Build-Depends-Indep: //g' dep.log
  31.   sed -i  's/linux-any //g' dep.log
  32.   sed -i  's/,//g' dep.log
  33.   sed -e "s_: \"[a-zA-Z0-9]*\" _: _g" -i dep.log
  34.   sed 's/linux-any/ /g' dep.log > dep2.log | mv dep2.log dep.log
  35.  
  36. echo "All Done!"  | sleep 1  | reset
  37. echo "------------------------------------------"
  38. echo "- BUILD-DEPENDS- hynten@speed-mailer.com -"
  39. echo "-                                        -"
  40. echo "- Strip Depends: from file session.log   -"
  41. echo "-        source: apt-cache showrc        -"
  42. echo "--2015------------------------------------"
  43. echo "                                          "
  44. cat dep.log
  45.   #mv dep.log deps-$package.log
  46.   #That's a good start to a nice script dont you think  
  47. echo "                                           "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement