04-build-installer.sh 18.1 KB
Newer Older
1
2
3
4
5
6
#! /bin/bash

# Script to bundle data using previously-built KDE and digiKam installation
# and create a Windows installer file with NSIS application
# Dependency : NSIS makensis program for Linux.
#
Gilles Caulier's avatar
Gilles Caulier committed
7
# Copyright (c) 2015-2022 by Gilles Caulier  <caulier dot gilles at gmail dot com>
8
9
10
11
12
13
14
15
16
17
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

# Halt and catch errors
set -eE
trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG
trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR

Gilles Caulier's avatar
Gilles Caulier committed
18
19
export LANG=C

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#################################################################################################
# Manage script traces to log file

mkdir -p ./logs
exec > >(tee ./logs/build-installer.full.log) 2>&1

#################################################################################################

echo "04-build-installer.sh : build digiKam Windows installer."
echo "--------------------------------------------------------"

#################################################################################################
# Pre-processing checks

. ./config.sh
. ./common.sh
StartScript
ChecksCPUCores
Gilles Caulier's avatar
Gilles Caulier committed
38
RegisterRemoteServers
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

#################################################################################################
# Check if NSIS CLI tools is installed

if ! which makensis ; then
    echo "NSIS CLI tool is not installed"
    echo "See http://nsis.sourceforge.net/ for details."
    exit 1
else
    echo "Check NSIS CLI tools passed..."
fi

#################################################################################################
# Configurations

# Directory where this script is located (default - current directory)
BUILDDIR="$PWD"

# Directory where bundle files are located
BUNDLEDIR="$BUILDDIR/temp"

ORIG_WD="`pwd`"

DK_RELEASEID=`cat $ORIG_WD/data/RELEASEID.txt`

#################################################################################################
65
# Build icons-set resource
66

67
echo -e "\n---------- Build icons-set resource\n"
68
69
70
71

cd $ORIG_WD/icon-rcc

rm -f CMakeCache.txt > /dev/null
72
73
74
rm -f Makefile > /dev/null
rm -f cmake_install.cmake > /dev/null
rm -fr CMakeFiles > /dev/null
Gilles Caulier's avatar
Gilles Caulier committed
75
rm -fr icon-rcc-prefix > /dev/null
Gilles Caulier's avatar
Gilles Caulier committed
76
rm -f *.rcc > /dev/null
77

78
79
80
81
cmake -DCMAKE_COLOR_MAKEFILE=ON \
      -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \
      -DKA_VERSION=$DK_KA_VERSION \
      -DKF5_VERSION=$DK_KF5_VERSION \
82
83
      -DENABLE_QTVERSION=$DK_QTVERSION \
      -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE \
84
85
86
87
88
      -Wno-dev \
      .

make -j$CPU_CORES

89
90
91
mv $BUILDDIR/icon-rcc/icon-rcc-prefix/src/icon-rcc-build/icons/breeze-icons.rcc           $BUILDDIR/icon-rcc/
mv $BUILDDIR/icon-rcc/icon-rcc-prefix/src/icon-rcc-build/icons-dark/breeze-icons-dark.rcc $BUILDDIR/icon-rcc/

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#################################################################################################
# Copy files

echo -e "\n---------- Copy files in bundle directory\n"

# Directories creation -----------------------------------------------------------------------

cd $ORIG_WD

if [ -d "$BUNDLEDIR" ]; then
    rm -fr $BUNDLEDIR
    mkdir $BUNDLEDIR
fi

mkdir -p $BUNDLEDIR/data
mkdir -p $BUNDLEDIR/etc
mkdir -p $BUNDLEDIR/share
mkdir -p $BUNDLEDIR/translations

# Data files ---------------------------------------------------------------------------------

echo -e "\n---------- Marble data"
114
cp -r $MXE_INSTALL_PREFIX/data/*                                        $BUNDLEDIR/data             2>/dev/null
115
116

echo -e "\n---------- Generics data"
117
118
119
120
121
cp -r $MXE_INSTALL_PREFIX/share/lensfun                                 $BUNDLEDIR/data             2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/data/digikam                              $BUNDLEDIR/data             2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/data/showfoto                             $BUNDLEDIR/data             2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/data/solid                                $BUNDLEDIR/data             2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/data/k*                                   $BUNDLEDIR/data             2>/dev/null
122

123
124
# Copy digiKam hi-colors PNG icons-set to the bundle

125
126
127
cp -r $MXE_INSTALL_PREFIX/bin/data/icons                                $BUNDLEDIR/data             2>/dev/null
rm -fr $BUNDLEDIR/data/icons/breeze*                                                                2>/dev/null
rm -fr $BUNDLEDIR/data/icons/*.qrc                                                                  2>/dev/null
128

129
echo -e "\n---------- Qt config"
130
cp    $BUILDDIR/data/qt.conf                                            $BUNDLEDIR/                 2>/dev/null
131
132

echo -e "\n---------- icons-set"
Maik Qualmann's avatar
Maik Qualmann committed
133
cp    $BUILDDIR/icon-rcc/breeze-icons.rcc                               $BUNDLEDIR/breeze.rcc       2>/dev/null
134
cp    $BUILDDIR/icon-rcc/breeze-icons-dark.rcc                          $BUNDLEDIR/breeze-dark.rcc  2>/dev/null
135
136

echo -e "\n---------- i18n"
137
138
cp -r $MXE_INSTALL_PREFIX/qt5/translations/qt*                          $BUNDLEDIR/translations     2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/data/locale                               $BUNDLEDIR/data             2>/dev/null
139
140

echo -e "\n---------- Xdg"
141
142
cp -r $MXE_INSTALL_PREFIX/etc/xdg                                       $BUNDLEDIR/etc              2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/data/xdg                                  $BUNDLEDIR/share            2>/dev/null
143

144
145
146
147
148
149
150
151
152
153
154
echo -e "\n---------- Copy Git Revisions Manifest"

touch $BUNDLEDIR/MANIFEST.txt

FILES=$(ls $ORIG_WD/data/*_manifest.txt)

for FILE in $FILES ; do
    echo $FILE
    cat $FILE >> $BUNDLEDIR/MANIFEST.txt
done

155
156
157
# Plugins Shared libraries -------------------------------------------------------------------

echo -e "\n---------- Qt5 plugins"
158
cp -r $MXE_INSTALL_PREFIX/qt5/plugins                                   $BUNDLEDIR/                 2>/dev/null
159
160

echo -e "\n---------- Marble plugins"
161
cp -r $MXE_INSTALL_PREFIX/plugins/*.dll                                 $BUNDLEDIR/plugins          2>/dev/null
162

163
echo -e "\n---------- digiKam and KF5 plugins"
164
cp -r $MXE_INSTALL_PREFIX/lib/plugins                                   $BUNDLEDIR/                 2>/dev/null
165
166

echo -e "\n---------- OpenAL for QtAV"
167
cp -r $MXE_INSTALL_PREFIX/bin/OpenAL32.dll                              $BUNDLEDIR/                 2>/dev/null
168

169
echo -e "\n---------- DrMinGw run-time"
170
171
172
173
174
cp -r $MXE_INSTALL_PREFIX/bin/exchndl.dll                               $BUNDLEDIR/                 2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/mgwhelp.dll                               $BUNDLEDIR/                 2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/dbgcore.dll                               $BUNDLEDIR/                 2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/symsrv.dll                                $BUNDLEDIR/                 2>/dev/null
cp -r $MXE_INSTALL_PREFIX/bin/symsrv.yes                                $BUNDLEDIR/                 2>/dev/null
175

176
# Do not include this file from DrMinGW as it require extra devel dll from Microsoft at run-time.
177
#cp -r $MXE_INSTALL_PREFIX/bin/dbghelp.dll                               $BUNDLEDIR/                2>/dev/null
178

179
180
181
182
183
184
echo -e "\n---------- libgphoto2 drivers"
mkdir $BUNDLEDIR/libgphoto2                                                                         2>/dev/null
mkdir $BUNDLEDIR/libgphoto2_port                                                                    2>/dev/null
cp $MXE_INSTALL_PREFIX/lib/libgphoto2/*/*.dll                           $BUNDLEDIR/libgphoto2       2>/dev/null
cp $MXE_INSTALL_PREFIX/lib/libgphoto2_port/*/*.dll                      $BUNDLEDIR/libgphoto2_port  2>/dev/null

185
186
187
188
189
echo -e "\n---------- Copy executables with recursive dependencies in bundle directory\n"

# Executables and plugins shared libraries dependencies scan ---------------------------------

EXE_FILES="\
190
191
192
193
194
195
$MXE_INSTALL_PREFIX/bin/digikam.exe \
$MXE_INSTALL_PREFIX/bin/showfoto.exe \
$MXE_INSTALL_PREFIX/bin/kbuildsycoca5.exe \
$MXE_INSTALL_PREFIX/qt5/bin/QtWebNetworkProcess.exe \
$MXE_INSTALL_PREFIX/qt5/bin/QtWebProcess.exe \
$MXE_INSTALL_PREFIX/qt5/bin/QtWebStorageProcess.exe \
196
197
198
"
for app in $EXE_FILES ; do

199
200
    cp $app $BUNDLEDIR/
    $ORIG_WD/rll.py --copy --installprefix $MXE_INSTALL_PREFIX --odir $BUNDLEDIR --efile $app
201
202
203
204

done

DLL_FILES="\
205
206
207
208
209
`find  $MXE_INSTALL_PREFIX/lib/plugins         -name "*.dll" -type f | sed 's|$MXE_INSTALL_PREFIX/libs/plugins||'`        \
`find  $MXE_INSTALL_PREFIX/qt5/plugins         -name "*.dll" -type f | sed 's|$MXE_INSTALL_PREFIX/qt5/plugins||'`         \
`find  $MXE_INSTALL_PREFIX/plugins             -name "*.dll" -type f | sed 's|$MXE_INSTALL_PREFIX/plugins/||'`            \
`find  $MXE_INSTALL_PREFIX/lib/libgphoto2      -name "*.dll" -type f | sed 's|$MXE_INSTALL_PREFIX/lib/libgphoto2||'`      \
`find  $MXE_INSTALL_PREFIX/lib/libgphoto2_port -name "*.dll" -type f | sed 's|$MXE_INSTALL_PREFIX/lib/libgphoto2_port||'` \
210
211
212
$MXE_INSTALL_PREFIX/bin/OpenAL32.dll \
$MXE_INSTALL_PREFIX/bin/exchndl.dll  \
$MXE_INSTALL_PREFIX/bin/mgwhelp.dll  \
213
214
215
216
217
218
219
220
221
222
223
224
225
226
"

for app in $DLL_FILES ; do

    $ORIG_WD/rll.py --copy --installprefix $MXE_INSTALL_PREFIX --odir $BUNDLEDIR --efile $app

done

#################################################################################################
# Cleanup symbols in binary files to free space.

echo -e "\n---------- Strip symbols in binary files\n"

if [[ $DK_DEBUG = 1 ]] ; then
Gilles Caulier's avatar
polish    
Gilles Caulier committed
227

228
229
230
    find $BUNDLEDIR -name \*exe | grep -Ev '(digikam|showfoto)' | xargs ${MXE_BUILDROOT}/usr/bin/${MXE_BUILD_TARGETS}-strip --strip-all
    find $BUNDLEDIR -name \*dll | grep -Ev '(digikam|showfoto)' | xargs ${MXE_BUILDROOT}/usr/bin/${MXE_BUILD_TARGETS}-strip --strip-all

231
232
    find $BUNDLEDIR -name \*exe | grep -E '(digikam|showfoto)'  | xargs ${MXE_BUILDROOT}/usr/bin/${MXE_BUILD_TARGETS}-strip
    find $BUNDLEDIR -name \*dll | grep -E '(digikam|showfoto)'  | xargs ${MXE_BUILDROOT}/usr/bin/${MXE_BUILD_TARGETS}-strip
Gilles Caulier's avatar
polish    
Gilles Caulier committed
233

234
else
Gilles Caulier's avatar
polish    
Gilles Caulier committed
235

236
237
    find $BUNDLEDIR -name \*exe | xargs ${MXE_BUILDROOT}/usr/bin/${MXE_BUILD_TARGETS}-strip --strip-all
    find $BUNDLEDIR -name \*dll | xargs ${MXE_BUILDROOT}/usr/bin/${MXE_BUILD_TARGETS}-strip --strip-all
Gilles Caulier's avatar
polish    
Gilles Caulier committed
238

239
240
fi

241
242
243
#################################################################################################
# Install ExifTool binary.

244
245
    cd $DOWNLOAD_DIR

246
if [ ! -f $DOWNLOAD_DIR/exiftool-$DK_EXIFTOOL_VERSION.zip ] ; then
247
    wget https://sourceforge.net/projects/exiftool/files/exiftool-$DK_EXIFTOOL_VERSION.zip/download -O exiftool-$DK_EXIFTOOL_VERSION.zip
248
249
fi

250
unzip -o $DOWNLOAD_DIR/exiftool-$DK_EXIFTOOL_VERSION.zip -d $BUNDLEDIR
251
mv "$BUNDLEDIR/exiftool(-k).exe" "$BUNDLEDIR/exiftool.exe"
252
253
254

#################################################################################################

255
if [[ $DK_DEBUG = 1 ]] ; then
Gilles Caulier's avatar
polish    
Gilles Caulier committed
256

257
    DEBUG_SUF="-debug"
Gilles Caulier's avatar
polish    
Gilles Caulier committed
258

259
fi
260

261
if [[ $DK_VERSION != v* ]] ; then
262

263
    # with non-official release version, use build time-stamp as sub-version string.
Gilles Caulier's avatar
Gilles Caulier committed
264
    DK_SUBVER="-`cat $ORIG_WD/data/BUILDDATE.txt`"
265

266
267
268
269
else

    # with official release version, disable upload to KDE server, as this break check for new version function.
    echo -e "Official release version detected, upload is disabled.\n"
Gilles Caulier's avatar
typo    
Gilles Caulier committed
270
    DK_UPLOAD=0
271

272
273
fi

274
275
276
277
278
#################################################################################################
# Build NSIS installer and Portable archive.

echo -e "\n---------- Build NSIS installer and Portable archive\n"

279
280
281
mkdir -p $ORIG_WD/bundle

if [ $MXE_BUILD_TARGETS == "i686-w64-mingw32.shared" ]; then
Gilles Caulier's avatar
polish    
Gilles Caulier committed
282

283
284
285
    TARGET_INSTALLER=digiKam-$DK_RELEASEID$DK_SUBVER-Win32$DEBUG_SUF.exe
    PORTABLE_FILE=digiKam-$DK_RELEASEID$DK_SUBVER-Win32$DEBUG_SUF.tar.xz
    CHECKSUM_FILE=digiKam-$DK_RELEASEID$DK_SUBVER-Win32$DEBUG_SUF.sum
286
    rm -f $ORIG_WD/bundle/*Win32$DEBUG_SUF* || true
Gilles Caulier's avatar
polish    
Gilles Caulier committed
287

288
else
Gilles Caulier's avatar
polish    
Gilles Caulier committed
289

290
291
292
    TARGET_INSTALLER=digiKam-$DK_RELEASEID$DK_SUBVER-Win64$DEBUG_SUF.exe
    PORTABLE_FILE=digiKam-$DK_RELEASEID$DK_SUBVER-Win64$DEBUG_SUF.tar.xz
    CHECKSUM_FILE=digiKam-$DK_RELEASEID$DK_SUBVER-Win64$DEBUG_SUF.sum
293
    rm -f $ORIG_WD/bundle/*Win64$DEBUG_SUF* || true
Gilles Caulier's avatar
polish    
Gilles Caulier committed
294

295
296
297
298
299
300
fi

cd $ORIG_WD/installer

makensis -DVERSION=$DK_RELEASEID -DBUNDLEPATH=$BUNDLEDIR -DTARGETARCH=$MXE_ARCHBITS -DOUTPUT=$ORIG_WD/bundle/$TARGET_INSTALLER ./digikam.nsi

301
302
cd $ORIG_WD
tar cf - `basename $BUNDLEDIR` --transform s/temp/digiKam/ | xz -4e > $ORIG_WD/bundle/$PORTABLE_FILE
303

304
#################################################################################################
305
# Show resume information and future instructions to host target files on remote server
306

307
echo -e "\n---------- Compute installer checksums for digiKam $DK_RELEASEID\n"          >  $ORIG_WD/bundle/$TARGET_INSTALLER.sum
308
309
310
311
312
313
echo    "File       : $TARGET_INSTALLER"                                                >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
echo -n "Size       : "                                                                 >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
du -h "$ORIG_WD/bundle/$TARGET_INSTALLER"        | { read first rest ; echo $first ; }  >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
echo -n "SHA256 sum : "                                                                 >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
shasum -a256 "$ORIG_WD/bundle/$TARGET_INSTALLER" | { read first rest ; echo $first ; }  >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum

314
# Checksums to post on Phabricator at release time.
315
316
317
318
319
320
321
322
323
324
325
shasum -a256 "$ORIG_WD/bundle/$TARGET_INSTALLER" > $ORIG_WD/bundle/$CHECKSUM_FILE

echo -e "\n---------- Compute Portable archive checksums for digiKam $DK_RELEASEID\n"   >  $ORIG_WD/bundle/$PORTABLE_FILE.sum
echo    "File       : $PORTABLE_FILE"                                                   >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
echo -n "Size       : "                                                                 >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
du -h "$ORIG_WD/bundle/$PORTABLE_FILE"        | { read first rest ; echo $first ; }     >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
echo -n "SHA256 sum : "                                                                 >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
shasum -a256 "$ORIG_WD/bundle/$PORTABLE_FILE" | { read first rest ; echo $first ; }     >> $ORIG_WD/bundle/$PORTABLE_FILE.sum

# Checksums to post on Phabricator at release time.
shasum -a256 "$ORIG_WD/bundle/$PORTABLE_FILE" >> $ORIG_WD/bundle/$CHECKSUM_FILE
326

327
if [[ $DK_SIGN = 1 ]] ; then
Gilles Caulier's avatar
Gilles Caulier committed
328

329
330
    echo -e "\n---------- Compute Signature checksums for digiKam installer $DK_RELEASEID\n"    >  $ORIG_WD/bundle/$TARGET_INSTALLER.sum

Gilles Caulier's avatar
Gilles Caulier committed
331
    cat ~/.gnupg/dkorg-gpg-pwd.txt | gpg --batch --yes --passphrase-fd 0 -sabv "$ORIG_WD/bundle/$TARGET_INSTALLER"
Gilles Caulier's avatar
typo    
Gilles Caulier committed
332
    mv -f $ORIG_WD/bundle/$TARGET_INSTALLER.asc $ORIG_WD/bundle/$TARGET_INSTALLER.sig
Gilles Caulier's avatar
Gilles Caulier committed
333
334
335
336
337
338
339

    echo    "File       : $TARGET_INSTALLER.sig"                                                >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
    echo -n "Size       : "                                                                     >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
    du -h "$ORIG_WD/bundle/$TARGET_INSTALLER.sig"        | { read first rest ; echo $first ; }  >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
    echo -n "SHA256 sum : "                                                                     >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum
    shasum -a256 "$ORIG_WD/bundle/$TARGET_INSTALLER.sig" | { read first rest ; echo $first ; }  >> $ORIG_WD/bundle/$TARGET_INSTALLER.sum

340
    # Checksums to post on Phabricator at release time.
341
342
343
344
345
346
347
348
    shasum -a256 "$ORIG_WD/bundle/$TARGET_INSTALLER.sig" >> $ORIG_WD/bundle/$CHECKSUM_FILE

    echo -e "\n---------- Compute Signature checksums for digiKam Portable $DK_RELEASEID\n"     >  $ORIG_WD/bundle/$PORTABLE_FILE.sum

    cat ~/.gnupg/dkorg-gpg-pwd.txt | gpg --batch --yes --passphrase-fd 0 -sabv "$ORIG_WD/bundle/$PORTABLE_FILE"
    mv -f $ORIG_WD/bundle/$PORTABLE_FILE.asc $ORIG_WD/bundle/$PORTABLE_FILE.sig

    echo    "File       : $PORTABLE_FILE.sig"                                                >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
Gilles Caulier's avatar
polish    
Gilles Caulier committed
349
    echo -n "Size       : "                                                                  >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
350
    du -h "$ORIG_WD/bundle/$PORTABLE_FILE.sig"        | { read first rest ; echo $first ; }  >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
Gilles Caulier's avatar
polish    
Gilles Caulier committed
351
    echo -n "SHA256 sum : "                                                                  >> $ORIG_WD/bundle/$PORTABLE_FILE.sum
352
353
354
355
    shasum -a256 "$ORIG_WD/bundle/$PORTABLE_FILE.sig" | { read first rest ; echo $first ; }  >> $ORIG_WD/bundle/$PORTABLE_FILE.sum

    # Checksums to post on Phabricator at release time.
    shasum -a256 "$ORIG_WD/bundle/$PORTABLE_FILE.sig" >> $ORIG_WD/bundle/$CHECKSUM_FILE
356

357
358
fi

359
cat $ORIG_WD/bundle/$TARGET_INSTALLER.sum
360
cat $ORIG_WD/bundle/$PORTABLE_FILE.sum
361
362
363
364
365
366

if [[ $DK_UPLOAD = 1 ]] ; then

    echo -e "---------- Cleanup older Windows bundle files from files.kde.org repository \n"

    if [ $MXE_BUILD_TARGETS == "i686-w64-mingw32.shared" ]; then
367
368
        sftp -q $DK_UPLOADURL:$DK_UPLOADDIR <<< "rm *-Win32$DEBUG_SUF.exe*"
        sftp -q $DK_UPLOADURL:$DK_UPLOADDIR <<< "rm *-Win32$DEBUG_SUF.tar.xz*"
369
    else
370
371
        sftp -q $DK_UPLOADURL:$DK_UPLOADDIR <<< "rm *-Win64$DEBUG_SUF.exe*"
        sftp -q $DK_UPLOADURL:$DK_UPLOADDIR <<< "rm *-Win64$DEBUG_SUF.tar.xz*"
372
373
374
375
    fi

    echo -e "---------- Upload new Windows bundle files to files.kde.org repository \n"

376
377
    rsync -r -v --progress -e ssh $ORIG_WD/bundle/$TARGET_INSTALLER $DK_UPLOADURL:$DK_UPLOADDIR
    rsync -r -v --progress -e ssh $ORIG_WD/bundle/$PORTABLE_FILE $DK_UPLOADURL:$DK_UPLOADDIR
378
379
380

    if [[ $DK_SIGN = 1 ]] ; then
        scp $ORIG_WD/bundle/$TARGET_INSTALLER.sig $DK_UPLOADURL:$DK_UPLOADDIR
381
        scp $ORIG_WD/bundle/$PORTABLE_FILE.sig $DK_UPLOADURL:$DK_UPLOADDIR
382
383
    fi

384
385
    # update remote files list

386
    sftp -q $DK_UPLOADURL:$DK_UPLOADDIR <<< "ls digi*" > $ORIG_WD/bundle/ls.txt
Gilles Caulier's avatar
Gilles Caulier committed
387
    tail -n +2 $ORIG_WD/bundle/ls.txt > $ORIG_WD/bundle/ls.tmp
388
    cat $ORIG_WD/bundle/ls.tmp | grep -E '(.pkg |.appimage |.exe )' | grep -Ev '(debug)' > $ORIG_WD/bundle/FILES
Gilles Caulier's avatar
Gilles Caulier committed
389
    rm $ORIG_WD/bundle/ls.tmp
Gilles Caulier's avatar
cleanup    
Gilles Caulier committed
390
    rm $ORIG_WD/bundle/ls.txt
391
    sftp -q $DK_UPLOADURL:$DK_UPLOADDIR <<< "rm FILES"
Gilles Caulier's avatar
Gilles Caulier committed
392
    rsync -r -v --progress -e ssh $BUILDDIR/bundle/FILES $DK_UPLOADURL:$DK_UPLOADDIR
393

394
else
Gilles Caulier's avatar
polish    
Gilles Caulier committed
395

396
397
398
    echo -e "\n------------------------------------------------------------------"
    curl https://download.kde.org/README_UPLOAD
    echo -e "------------------------------------------------------------------\n"
Gilles Caulier's avatar
polish    
Gilles Caulier committed
399

400
401
402
403
404
fi

#################################################################################################

TerminateScript