summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-08-03 11:53:19 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-08-03 11:53:19 +0200
commit147e1f6902ddb288930ec0d6d622e192c6e4d374 (patch)
treec5e9c7ed54abdb8011c936bc38aaba9364ba2927 /bin
parent91b26c3f5e55db39eb2afce52453f47fd3c7f360 (diff)
bin/pkg: Added dependencies on perl libraries
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/pkg b/bin/pkg
index 600be8b..bee546f 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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 () {