diff --git a/app/dist/common/check_dependenties.pl b/app/dist/common/check_dependenties.pl new file mode 100644 index 0000000..ef08c92 --- /dev/null +++ b/app/dist/common/check_dependenties.pl @@ -0,0 +1,15 @@ + +while() { + chomp; + $app = $_; + $path = `which $app 2>/dev/null`; + $err = $?; + print $app.": "; + if($err != 0) { + print "failed ($err)\n"; + } + else { + print $path; + } +} + diff --git a/app/dist/common/find_perl_deps.pl b/app/dist/common/find_perl_deps.pl new file mode 100644 index 0000000..deb79c8 --- /dev/null +++ b/app/dist/common/find_perl_deps.pl @@ -0,0 +1,29 @@ + + +while() { + chomp; + # najpierw nazwa pliku zrodlowego out + if($_ =~ /^[^:]*\:\s*(.*)$/) { + my $line = $1; +# print "TEXT: $line\n"; + # teraz tylko samo polecenie + if($line =~ /\`\s*(.+)\s*\`/) { + my $cmd = $1; +# print "CMD: $cmd\n"; + # teraz splitujemy potoki + my @progs = split(/\s*\|\s*/, $cmd); + foreach (@progs) { +# print "$_\n"; + # ucinamy agrumenty programu + # oraz linie, zawierajace nie-programy (--replace, $tmpfile_x, /g, \\, itp.) + if($_ =~ /^([^\$\\\/\s\']+)(\s.*)?$/) { + my $app = $1; +# print "APP: $app\n"; +# my $res = `which $app`; +# print "WYNIK: $res\n"; + print "$app\n"; + } + } # foreach + } + } +} diff --git a/app/dist/common/find_rpm_deps.sh b/app/dist/common/find_rpm_deps.sh new file mode 100755 index 0000000..d870429 --- /dev/null +++ b/app/dist/common/find_rpm_deps.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# sprawdzamy czy podano argument +if test $# -lt 1; then echo RPM file name expected!; exit -1; fi + +# sprawdzamy czy to plik, potem, czy rpm +if test -f $1; \ +then + if test "rpm" = `ls $1 | tail -c 4`; \ + then + rpm -q -R -p $1; \ + else echo "It's not a RPM file!"; \ + fi +else echo RPM file not found!; \ +fi + diff --git a/app/dist/common/make_deps.sh b/app/dist/common/make_deps.sh new file mode 100755 index 0000000..6bf55c7 --- /dev/null +++ b/app/dist/common/make_deps.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +grep -r -e "\`" ../../src | grep -v -e "\.svn\/" | perl find_perl_deps.pl | sort | uniq > dep_list.txt