source: lliurex-meta-maker/trunk/fuentes/bin/lliurex-meta-list-generator @ 1284

Last change on this file since 1284 was 1284, checked in by kbut, 4 years ago

fix

  • Property svn:executable set to *
File size: 576 bytes
Line 
1#!/bin/bash
2usage(){
3        echo -e "\nUsage:"
4        echo -e "\t$0 file [files ...]"
5        echo -e "\t*** Note:files on seed format (wiki) ***\n"
6        exit 0
7}
8if [ $# -le 0 ]; then
9        usage
10fi
11ALLPACKAGESFILE=$(tempfile)
12DEPENDSFILE=$(tempfile)
13RESULT=$(tempfile)
14for file in $@; do
15        cat $file | grep "^ \*" | awk '{ print $2}' | tr -d '(' | tr -d ')' >> $ALLPACKAGESFILE
16done
17ALLPACKAGES=$(cat $ALLPACKAGESFILE | sort -u | tr '\n' ' ')
18lliurex-resolver -i $ALLPACKAGES -o $DEPENDSFILE -d 1>/dev/null
19cat $DEPENDSFILE | cut -f 1 | sort -u > $RESULT
20echo "$RESULT"
21rm $ALLPACKAGESFILE $DEPENDSFILE
Note: See TracBrowser for help on using the repository browser.