diff options
-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" } |