diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-03 11:53:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-03 11:53:19 +0200 |
commit | 147e1f6902ddb288930ec0d6d622e192c6e4d374 (patch) | |
tree | c5e9c7ed54abdb8011c936bc38aaba9364ba2927 | |
parent | 91b26c3f5e55db39eb2afce52453f47fd3c7f360 (diff) |
bin/pkg: Added dependencies on perl libraries
-rwxr-xr-x | bin/pkg | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -272,18 +272,28 @@ check_path_dep () { which $1 > /dev/null } +check_perl_dep () { + perl -M$1 < /dev/null 2> /dev/null +} + check_deps () { [[ -r $PDIR/$1/dependencies ]] || return 0 dependencies=($(cat $PDIR/$1/dependencies)) install=() path_install=() + perl_install=() for dep in $dependencies; { pathdep=${dep#=} + perldep=${dep#perl=} if [[ $dep != $pathdep ]] { if (! check_path_dep $pathdep) { path_install+=$pathdep } + } elif [[ $dep != $perldep ]] { + if (! check_perl_dep $perldep) { + perl_install+=$perldep + } } else { if [[ ! -d $PDIR/$dep ]] { install+=$dep @@ -303,10 +313,16 @@ check_deps () { } if [[ -n $path_install ]] { clear_line - info "$1 has unmet dependencies: " + info "$1 requires the following executables: " echo $path_install echo 'Please make sure these files are within $PATH' } + if [[ -n $perl_install ]] { + clear_line + info "$1 requires the following perl libraries: " + echo $perl_install + echo 'Please make sure they are installed correctly' + } } check_conflicts () { |