Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

edogawaconan

By: a guest on Feb 22nd, 2009  |  syntax: None  |  size: 0.49 KB  |  hits: 187  |  expires: Never
download  |  raw  |  embed  |  report abuse
This paste has a previous version, view the difference. Copied
  1. #!/bin/sh
  2.  
  3. if [ -x $1 ] || [ -x $2 ]; then
  4.         echo "Usage: getdeps package-name list-output-file"
  5.         exit
  6. fi
  7. if [ ! -f $1 ]; then
  8.         echo "File \""$1"\" not found"
  9.         exit
  10. fi
  11. sudo /usr/bin/pacman -Sp `cat $1 | grep "^makedepends" | cut -b 13- | sed -e 's/^(//g' -e 's/)$//g' -e "s,',,g"` | tail -n +2 > $2
  12. sudo /usr/bin/pacman -Sp `cat $1 | grep "^depends" | cut -b 9- | sed -e 's/^(//g' -e 's/)$//g' -e "s,',,g"` | tail -n +2 >> $2
  13. echo "Finished parsing file \""$1"\""