Skip to content
Browse files

allow package hooks for package names with "-"

  • Loading branch information...
1 parent 894632e commit eb56b24af9db50a06cf3b5aaa8caaf5e31ea0680 @mpapis mpapis committed Dec 16, 2012
Showing with 26 additions and 26 deletions.
  1. +26 −26 core/internal/shell/package/strategies/gnu/functions
View
52 core/internal/shell/package/strategies/gnu/functions
@@ -22,28 +22,28 @@ To force it to reinstall, call:\n\tsm ${package_name} package install force\n"
paths enter "${source_path}"
- if command exists "${package_name}_dependencies"
+ if command exists "${package_name//-/_}_dependencies"
then
__sm.log.step "${package_name} ${package_version} ~ dependencies"
- "${package_name}_dependencies"
+ "${package_name//-/_}_dependencies"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ dependencies"
__sm.package.dependencies
__sm.log.step success
fi
- if command exists "${package_name}_prefetch"
+ if command exists "${package_name//-/_}_prefetch"
then
__sm.log.step "${package_name} ${package_version} ~ prefetch"
- "${package_name}_prefetch"
+ "${package_name//-/_}_prefetch"
__sm.log.step success
fi
- if command exists "${package_name}_fetch"
+ if command exists "${package_name//-/_}_fetch"
then
__sm.log.step "${package_name} ${package_version} ~ fetch"
- "${package_name}_fetch"
+ "${package_name//-/_}_fetch"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ fetch"
@@ -53,62 +53,62 @@ To force it to reinstall, call:\n\tsm ${package_name} package install force\n"
paths enter "${source_path}/${package_dir}"
- if command exists "${package_name}_postfetch"
+ if command exists "${package_name//-/_}_postfetch"
then
__sm.log.step "${package_name} ${package_version} ~ postfetch"
- "${package_name}_postfetch"
+ "${package_name//-/_}_postfetch"
__sm.log.step success
fi
- if command exists "${package_name}_patch"
+ if command exists "${package_name//-/_}_patch"
then
__sm.log.step "${package_name} ${package_version} ~ patch"
- "${package_name}_patch"
+ "${package_name//-/_}_patch"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ patch"
__sm.package.patch
__sm.log.step success
fi
- if command exists "${package_name}_preconfigure"
+ if command exists "${package_name//-/_}_preconfigure"
then
__sm.log.step "${package_name} ${package_version} ~ preconfigure"
- "${package_name}_preconfigure"
+ "${package_name//-/_}_preconfigure"
__sm.log.step success
fi
- if command exists "${package_name}_configure"
+ if command exists "${package_name//-/_}_configure"
then
- "${package_name}_configure"
+ "${package_name//-/_}_configure"
else
__sm.log.step "${package_name} ${package_version} ~ configure"
__sm.package.configure
__sm.log.step success
fi
- if command exists "${package_name}_postconfigure"
+ if command exists "${package_name//-/_}_postconfigure"
then
__sm.log.step "${package_name} ${package_version} ~ postconfigure"
- "${package_name}_postconfigure"
+ "${package_name//-/_}_postconfigure"
__sm.log.step success
fi
- if command exists "${package_name}_build"
+ if command exists "${package_name//-/_}_build"
then
__sm.log.step "${package_name} ${package_version} ~ build"
- "${package_name}_build"
+ "${package_name//-/_}_build"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ build"
__sm.package.gnu.make
__sm.log.step success
fi
- if command exists "${package_name}_preinstall"
+ if command exists "${package_name//-/_}_preinstall"
then
__sm.log.step "${package_name} ${package_version} ~ preinstall"
- "${package_name}_preinstall"
+ "${package_name//-/_}_preinstall"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ preinstall"
@@ -120,10 +120,10 @@ To force it to reinstall, call:\n\tsm ${package_name} package install force\n"
path "${packages_path}" name "${package_name}" version "${package_version}" \
source "${install_path}"
- if command exists "${package_name}_install"
+ if command exists "${package_name//-/_}_install"
then
__sm.log.step "${package_name} ${package_version} ~ install"
- "${package_name}_install"
+ "${package_name//-/_}_install"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ install"
@@ -135,10 +135,10 @@ To force it to reinstall, call:\n\tsm ${package_name} package install force\n"
from "${source_path}/${package_dir}" \
to "${install_path}/src"
- if command exists "${package_name}_postinstall"
+ if command exists "${package_name//-/_}_postinstall"
then
__sm.log.step "${package_name} ${package_version} ~ postinstall"
- "${package_name}_postinstall"
+ "${package_name//-/_}_postinstall"
__sm.log.step success
else
__sm.log.step "${package_name} ${package_version} ~ postinstall"
@@ -151,10 +151,10 @@ To force it to reinstall, call:\n\tsm ${package_name} package install force\n"
__sm.package.activate.first "${package_name}" "${package_version}"
fi
- if command exists "${package_name}_postactivate"
+ if command exists "${package_name//-/_}_postactivate"
then
__sm.log.step "${package_name} ${package_version} ~ postactivate"
- "${package_name}_postactivate"
+ "${package_name//-/_}_postactivate"
__sm.log.step success
fi

0 comments on commit eb56b24

Please sign in to comment.
Something went wrong with that request. Please try again.