Advertisement
grappas

Untitled

Apr 15th, 2018
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.82 KB | None | 0 0
  1. #!/bin/bash
  2. sudo apt-get install sed -y
  3. ##############UWAGA#################
  4.  
  5. #potrzebne jest dodatkowe utworzenie dwóch plików:
  6. #usun.txt - gdzie po spacjach wpisujemy paczki do usunięcia - skrypt sam zajmie się usunięciem zależności
  7. #instaluj.txt - gdzie po spacjach wpisujemy paczki do zainstalowania (obligatoryjny jeżeli po reboocie nie chcemy zastać czarnego, zimnego tty ;p)
  8.  
  9. #aptitude sam rozwiązuje zależności między usuwanymi a instalowanymi paczkami
  10. #nie odpowiadam za ew. szkody ;p
  11. #nie ma za co ;)
  12.  
  13. usun=`cat usun.txt`
  14. chuj=`apt-cache depends $usun | sed -e 's/.*\ //g' | tr '\r\n' ' '`
  15. instaluj=`cat instaluj.txt`
  16. for i in $instaluj
  17. do
  18. inst=$inst"$i+ "
  19. done
  20. sudo apt-get install aptitude -y
  21. sudo aptitude remove $usun $chuj $inst -y && sudo apt-get autoremove -y && sudo apt-get install $inst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement