Skip to content

Instantly share code, notes, and snippets.

@Intey
Created September 2, 2015 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Intey/df112bf4eb7be604b501 to your computer and use it in GitHub Desktop.
Save Intey/df112bf4eb7be604b501 to your computer and use it in GitHub Desktop.
#!/bin/python3
import sys
import os
packs=[]
deps=[]
packs = sys.argv[1:]
if not packs:
print("suppli packs")
exit()
for p in packs:
cmd = "expac -S '%D' " + p
print(cmd)
deps += os.popen(cmd).read()[:-1].split()
cmd= 'sudo pacman -Sw --cachedir /home/intey/cache ' + ' '.join(packs) + " " + ' '.join(deps)
print(cmd)
print(os.popen(cmd).read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment