Ajout script de vérification d'installation

This commit is contained in:
2015-07-04 13:28:43 +02:00
parent afe7725c1b
commit ab10d60215
3 changed files with 29 additions and 9 deletions

View File

@ -43,8 +43,7 @@ function exec_hook {
# If the script did not execute properly, we stop here
if [ $? != 0 ]; then
error "The '${hook_name}' hook script did not finished properly !"
exit 1
fatal "The '${hook_name}' hook script did not finished properly !"
fi
}
@ -68,7 +67,7 @@ function create_debian_control_file {
package_priority=$(get_project_opt .priority)
echo "Priority: ${package_priority:-optional}" >> "${control_file}"
package_arch=$(get_project_opt .package_arch)
package_arch=$(get_project_opt .arch)
echo "Architecture: ${package_arch:-all}" >> "${control_file}"
dependencies=$( get_project_opt ".dependencies | .[\"${DISTRIB}\"] | @sh" | sed "s/' '/, /g" | sed "s/'//g" )
@ -158,8 +157,7 @@ function build_project {
info "Package created ! (${build_dir}/${project_name}.deb)"
if [ $? != 0 ]; then
error "The build process has not completed successfuly !"
exit 1
fatal "The build process has not completed successfuly !"
fi
cd ${SRC_DIR}

View File

@ -1,3 +1,12 @@
#!/usr/bin/env bash
dpkg --install "$1" || apt-get install -f
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "${DIR}/util.sh"
info "Updating packages definition..."
apt-get update
info "Installing package $1..."
gdebi --n "$1"