File indexing completed on 2025-01-05 04:00:16
0001 #!/bin/bash 0002 0003 # Script to run all Linux sub-scripts to build AppImage bundle. 0004 # 0005 # SPDX-FileCopyrightText: 2015-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0006 # 0007 # SPDX-License-Identifier: BSD-3-Clause 0008 # 0009 0010 ######################################################################## 0011 # Function to upload host log files 0012 HostUploadLogFiles() 0013 { 0014 0015 if [[ $DK_UPLOAD = 1 ]] ; then 0016 0017 echo -e "---------- Cleanup older host logs from files.kde.org repository \n" 0018 0019 sftp -q $DK_UPLOADURL:$DK_UPLOADDIR/build.logs/lin64 <<< "rm build-host.full.log.gz" 0020 sftp -q $DK_UPLOADURL:$DK_UPLOADDIR/build.logs/lin64 <<< "rm build-extralibs.full.log.gz" 0021 0022 echo -e "---------- Compress host log files \n" 0023 0024 gzip -k $ORIG_WD/logs/build-host.full.log $ORIG_WD/logs/build-host.full.log.gz || true 0025 gzip -k $ORIG_WD/logs/build-extralibs.full.log $ORIG_WD/logs/build-extralibs.full.log.gz || true 0026 0027 echo -e "---------- Upload new host logs to files.kde.org repository \n" 0028 0029 rsync -r -v --progress -e ssh $ORIG_WD/logs/build-host.full.log.gz $DK_UPLOADURL:$DK_UPLOADDIR/build.logs/lin64 || true 0030 rsync -r -v --progress -e ssh $ORIG_WD/logs/build-extralibs.full.log.gz $DK_UPLOADURL:$DK_UPLOADDIR/build.logs/lin64 || true 0031 0032 echo -e "---------- Cleanup local bundle log file archives \n" 0033 0034 rm -f $ORIG_WD/logs/build-host.full.log.gz || true 0035 rm -f $ORIG_WD/logs/build-extralibs.full.log.gz || true 0036 0037 fi 0038 0039 } 0040 0041 # Halt and catch errors 0042 set -eE 0043 trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG 0044 trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR 0045 trap HostUploadLogFiles ERR exit 0046 0047 ################################################################################################# 0048 # Pre-processing checks 0049 0050 ORIG_WD="`pwd`" 0051 0052 . ./common.sh 0053 . ./config.sh 0054 StartScript 0055 ChecksRunAsRoot 0056 ChecksCPUCores 0057 HostAdjustments 0058 0059 echo "This script will build from scratch the digiKam AppImage bundle for Linux." 0060 echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" 0061 0062 ./01-build-host.sh 0063 ./02-build-extralibs.sh 0064 ./update.sh 0065 0066 echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" 0067 0068 TerminateScript