Advertisement
Guest User

foreign_packages.sh

a guest
May 12th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. #!/bin/bash
  2. if [ ! -x /usr/bin/apt-show-versions ]
  3. then
  4.   echo 'To use this script, please run this command first:'
  5.   echo '  sudo apt install apt-show-versions'
  6.   exit 1
  7. fi
  8. FOREIGN=$(tempfile --prefix=ood_)
  9. /usr/bin/apt-show-versions | grep -Ev ' (uptodate|not installed)$' > $FOREIGN
  10. if [ -e $FOREIGN ]
  11. then
  12.   echo 'Note: No packages / package versions of unknown origin were found' >&2
  13. else
  14.   echo 'Packages / package versions which are installed but of unknown origin:'
  15.   cat $FOREIGN
  16. fi
  17. rm $FOREIGN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement