#!/bin/bash set -eu readonly app_name=seafile source auto_update_config.sh 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" echo "$msg" | mail.mailutils --content-type="text/plain; charset=UTF-8" -A "${app_name}_build_temp.log" -s "Autoupgrade $app_name : $result" "$notify_email" fi