diff options
author | Mahrud Sayrafi <root@eve> | 2013-01-21 01:31:17 -0800 |
---|---|---|
committer | Mahrud Sayrafi <root@eve> | 2013-01-21 01:40:46 -0800 |
commit | ecf6303f60c36258e05eec9f24706c437775bd61 (patch) | |
tree | 33943771034c7a55bdbe1b626bd4dce689574925 /makelist | |
parent | 87c07dcd1ac6ec54e9ef63327a84d391c64b4368 (diff) | |
download | jux-jail.git-master.tar.gz jux-jail.git-master.tar.xz jux-jail.git-master.zip |
Now pretty much everything can be done through make.
Diffstat (limited to 'makelist')
-rw-r--r-- | makelist | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/makelist b/makelist new file mode 100644 index 0000000..e8cd8d9 --- /dev/null +++ b/makelist @@ -0,0 +1,36 @@ +#!/bin/bash + +# Warning: make sure you don't have Adobe linux repository enabled. +# That stupid sh*t has some of the needed glibc libraries in it! +# Can cause problems. + +set -e + +function makelist { + if [[ -z "$@" ]] + then + echo "syntax: makelist PACKAGE [PACKAGE ...]" + echo " e.g: makelist cpp gcc gcc-c++" + echo " e.g: makelist fpc" + exit + fi + + HASH="/tmp/.makelist_HASH" + touch $HASH + + echo $@ | sed "s/ /\n/g" >> list + cat list | sort | uniq | sponge list + + yum deplist `cat list` > deps + cat deps | grep provider | awk {'print $2'} | cut -d'.' -f1 >> list + cat list | sort | uniq | sponge list + if [ `cat list | md5sum | awk {'print $1'}` == "`cat $HASH 2> /dev/null`" ] + then + exit + else + cat list | md5sum | awk {'print $1'} > $HASH + makelist `cat list` + fi +} + +makelist $@ |