Un-break the packaging script.
This commit is contained in:
parent
39c90dd879
commit
10bf663a3b
13
package.sh
13
package.sh
|
@ -171,15 +171,6 @@ do_build() {
|
||||||
echo "Build completed successfully."
|
echo "Build completed successfully."
|
||||||
}
|
}
|
||||||
|
|
||||||
# return a list of package dependencies for fpm
|
|
||||||
get_fpm_pkg_deps() {
|
|
||||||
local deps=" "
|
|
||||||
for d in ${PKG_DEPS[@]}; do
|
|
||||||
deps="${deps} -d '${d}'"
|
|
||||||
done
|
|
||||||
echo -n ${deps}
|
|
||||||
}
|
|
||||||
|
|
||||||
# generate_postinstall_script creates the post-install script for the
|
# generate_postinstall_script creates the post-install script for the
|
||||||
# package. It must be passed the version.
|
# package. It must be passed the version.
|
||||||
generate_postinstall_script() {
|
generate_postinstall_script() {
|
||||||
|
@ -287,14 +278,14 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMMON_FPM_ARGS="-C $TMP_WORK_DIR --vendor $VENDOR --url $URL --license $LICENSE --maintainer $MAINTAINER --after-install $POST_INSTALL_PATH --name telegraf --version $VERSION --config-files $CONFIG_ROOT_DIR ."
|
COMMON_FPM_ARGS="-C $TMP_WORK_DIR --vendor $VENDOR --url $URL --license $LICENSE --maintainer $MAINTAINER --after-install $POST_INSTALL_PATH --name telegraf --version $VERSION --config-files $CONFIG_ROOT_DIR ."
|
||||||
$rpm_args fpm -s dir -t rpm $(get_fpm_pkg_deps) --description "$DESCRIPTION" $COMMON_FPM_ARGS
|
$rpm_args fpm -s dir -t rpm --description "$DESCRIPTION" $COMMON_FPM_ARGS
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to create RPM package -- aborting."
|
echo "Failed to create RPM package -- aborting."
|
||||||
cleanup_exit 1
|
cleanup_exit 1
|
||||||
fi
|
fi
|
||||||
echo "RPM package created successfully."
|
echo "RPM package created successfully."
|
||||||
|
|
||||||
fpm -s dir -t deb $deb_args $(get_fpm_pkg_deps) --description "$DESCRIPTION" $COMMON_FPM_ARGS
|
fpm -s dir -t deb $deb_args --description "$DESCRIPTION" $COMMON_FPM_ARGS
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to create Debian package -- aborting."
|
echo "Failed to create Debian package -- aborting."
|
||||||
cleanup_exit 1
|
cleanup_exit 1
|
||||||
|
|
Loading…
Reference in New Issue