diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-01 14:39:25 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-01 14:39:25 +0200 |
commit | eba5688feb1c7333b415c444d44f2e9f9fbf03b5 (patch) | |
tree | c5a981fb71e1da0ce32443d07ea945d65a9a4185 /bin/pkg | |
parent | c3ab87b44681453e2c38182b5397060a009b6c22 (diff) |
bin/pkg: automatically use makefiles
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -77,7 +77,12 @@ pkg_add () { cd $PDIR || return 255 info "Retrieving package $1...\n" $VCS_CMD $VCS_OPTIONS $VCS_ADD $PKG_ROOT/$1 || return 255 - if ([ -f $PDIR/$1/hooks/post-add ]) { + if ([ -r $PDIR/$1/Makefile ]) { + info "Building binaries\n" + cd $PDIR/$1 + make + } + if ([ -r $PDIR/$1/hooks/post-add ]) { info 'Executing post-add hook\n' . $PDIR/$1/hooks/post-add } @@ -117,11 +122,15 @@ pkg_update () { info "\rUpdating package $1 to $(echo $NEW | tail -n 1)" $VCS_CMD $VCS_OPTIONS $VCS_UPDATE $VCS_UPDATE_OPTIONS info "\rUpdated package $1 to $(echo $NEW | tail -n 1) \n" - checklinks $CL_OPTIONS - if ([ -f hooks/post-update ]) { + if ([ -r Makefile ]) { + info "Building binaries\n" + make + } + if ([ -r hooks/post-update ]) { info 'Executing post-update hook\n' . hooks/post-update } + checklinks $CL_OPTIONS } else { info "\r \r" } |