#!/bin/bash set -eu readonly app_name=seafile get_from_manifest() { result=$(python3 <&1 | tee "${app_name}_build_temp.log" return "${PIPESTATUS[0]}" } app_prev_version="$(get_from_manifest ".version" | cut -d'~' -f1)" app_version="$app_prev_version" if check_app_version then set +eu upgrade_app res=$? set -eu if [ $res -eq 0 ]; then result="Success" else result="Failed" fi msg="Build: $app_name version $app_version\n" msg+="$(cat ${app_name}_build_temp.log)" echo -e "$msg" | mail.mailutils -a "Content-Type: text/plain; charset=UTF-8" -s "Autoupgrade $app_name : $result" "$notify_email" fi