summaryrefslogtreecommitdiff
path: root/nightly_build.bash
blob: 5ec6b008ff01c1177d793caf79d03eb13b600f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
#!/bin/bash
cd "$(dirname "$0")"
function check_iso {

# check for possible errors in iso file

echo "K: Kanotix start iso check..." >>binary.log
    IERR=0
if grep -q "^E: " binary.log; then
    echo "K: build ERROR found...1" >>binary.log
    IERR=1
fi
if grep -F -q "Err:" binary.log; then
    echo "K: apt-cacher-ng ERROR found...2" >>binary.log
    IERR=2
fi
if grep -q ^parted binary.packages; then
    if grep ^parted binary.packages|grep kanotix >/dev/null; then
        echo
    else
        echo "K: non kanotix parted version found" >>binary.log
        echo "K: ERROR found...3" >>binary.log
        IERR=4
    fi
fi
if grep -q ^winetricks binary.packages; then
    if grep ^winetricks binary.packages|grep kanotix >/dev/null; then
        echo
    else
        echo "K: non kanotix winetricks version found" >>binary.log
        echo "K: ERROR found...4" >>binary.log
        IERR=4
    fi
fi
if [ $IERR -eq 0 ]; then
echo "K: Kanotix iso check passed..." >>binary.log
else
echo "K: Kanotix iso check errors detected... removing iso" >>binary.log
rm -f kanotix*.iso
fi

return $IERR
}

rm -rf cache tmpfs/cache

# delete iso files older 35 days

find /data/kanotix/nightly -mtime +35 -type f -print -delete
find /data/kanotix/nightly -type d -empty -print -delete

# reset apt-cacher-ng cache
find /var/cache/apt-cacher-ng \( -type f -name 'Packages*' -o -name 'Sources*' -o -name 'Release*' -o -name 'InRelease*' \) -delete

d="$(date +%y%m%d)"
v=a
target=/data/kanotix/nightly/$d
next=/data/kanotix/nightly/.next
rm -rf $next
mkdir -p $target $next

## remove gfxdetect entries from grub.cfg (for non-gfxdetect-builds)
#sed -i '/gfxdetect/,/^}/{d}' config/binary_grub/grub.cfg

BUILD_BOOKWORM=true
BUILD_BULLSEYE=true
BUILD_BUSTER=false
BUILD_BUSTER_EXTRA_KDE=true
BUILD_BUSTER_EXTRA_LXDE=true
BUILD_STRETCH=false
BUILD_JESSIE=false
BUILD_JESSIE_SPECIAL=false
BUILD_WHEEZY=false

################### SLOWFIRE  ###################

if $BUILD_BOOKWORM; then
git checkout auto/config
DISTRO=bookworm
KDISTRO=slowfire
rm -rf cache tmpfs/cache
sed -i 's/\(export LB_DISTRIBUTION=\).*/\1"'$DISTRO'"/' auto/config


cat <<"EOF" >$target/readme-$KDISTRO.txt
Slowfire Isos are widely untested.
==================================
amd64 Iso ship with acritoxinstaller(recommended) and calamares installer(for testing)
refind is preinstalled using grub in acritoxinstaller is recommended.
you can enable refind later in installation with # refind-install
EOF

ln -s $target/readme-$KDISTRO.txt $next/readme-$KDISTRO.txt

# kde 64
lb clean
lb config -d $DISTRO -p "debpool kanotix-kde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix slowfire-nightly Slowfire64 $d$v KDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
#ls -hgo kanotix64.iso >>binary.log; rm -f kanotix64.iso
mv kanotix64.iso $target/kanotix64-slowfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-slowfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix64-slowfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix64-slowfire-nightly-${d}${v}-KDE.iso ]; then
        echo "$KDISTRO amd64 KDE failed" >>isos-failed.txt
        cd -
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-KDE.log $next/kanotix64-slowfire-nightly-KDE.log
else
        md5sum -b kanotix64-slowfire-nightly-${d}${v}-KDE.iso > kanotix64-slowfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix64-slowfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-KDE.packages $next/kanotix64-slowfire-nightly-KDE.packages
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-KDE.log $next/kanotix64-slowfire-nightly-KDE.log
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-KDE.iso $next/kanotix64-slowfire-nightly-KDE.iso
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix64-slowfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-slowfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix64-slowfire-nightly-KDE.iso.md5
fi
#
# lxde 64
lb clean
lb config -d $DISTRO -p "debpool kanotix-lxde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix slowfire-nightly Slowfire64 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
#ls -hgo kanotix64.iso >>binary.log; rm -f kanotix64.iso
mv kanotix64.iso $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix64-slowfire-nightly-${d}${v}-LXDE.iso ]; then
        echo "$KDISTRO amd64 LXDE failed" >>isos-failed.txt
        cd -
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.log $next/kanotix64-slowfire-nightly-LXDE.log
else
        md5sum -b kanotix64-slowfire-nightly-${d}${v}-LXDE.iso > kanotix64-slowfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix64-slowfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.packages $next/kanotix64-slowfire-nightly-LXDE.packages
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.log $next/kanotix64-slowfire-nightly-LXDE.log
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.iso $next/kanotix64-slowfire-nightly-LXDE.iso
        ln -s $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix64-slowfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-slowfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix64-slowfire-nightly-LXDE.iso.md5
fi

# kde 32
lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix slowfire-nightly Slowfire32 $d$v KDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-slowfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-slowfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix32-slowfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix32-slowfire-nightly-${d}${v}-KDE.iso ]; then
        echo "$KDISTRO i386 KDE failed" >>isos-failed.txt
        cd -
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-KDE.log $next/kanotix32-slowfire-nightly-KDE.log
else
        md5sum -b kanotix32-slowfire-nightly-${d}${v}-KDE.iso > kanotix32-slowfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix32-slowfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-KDE.packages $next/kanotix32-slowfire-nightly-KDE.packages
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-KDE.log $next/kanotix32-slowfire-nightly-KDE.log
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-KDE.iso $next/kanotix32-slowfire-nightly-KDE.iso
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix32-slowfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-slowfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix32-slowfire-nightly-KDE.iso.md5
fi

# lxde 32
lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix slowfire-nightly Slowfire32 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix32-slowfire-nightly-${d}${v}-LXDE.iso ]; then
        echo "$KDISTRO i386 LXDE failed" >>isos-failed.txt
        cd -
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.log $next/kanotix32-slowfire-nightly-LXDE.log
else
        md5sum -b kanotix32-slowfire-nightly-${d}${v}-LXDE.iso > kanotix32-slowfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix32-slowfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.packages $next/kanotix32-slowfire-nightly-LXDE.packages
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.log $next/kanotix32-slowfire-nightly-LXDE.log
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.iso $next/kanotix32-slowfire-nightly-LXDE.iso
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix32-slowfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-slowfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix32-slowfire-nightly-LXDE.iso.md5
fi

# eeepc4G with LXDE
lb clean
lb config -d $DISTRO -p "kanotix-eeepc4G netsurf-gtk" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix slowfire-nightly Slowfire32 $d$v eeepc4G > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.packages
cp tmpfs/binary.log $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.log
cd $target
if [ ! -f kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso ]; then
        echo "$KDISTRO i386 eeepc4G failed" >>isos-failed.txt
        cd -
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-slowfire-nightly-eeepc4G.log
else
        md5sum -b kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso > kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso.md5
        zsyncmake kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso
        cd -
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.packages $next/kanotix32-slowfire-nightly-eeepc4G.packages
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-slowfire-nightly-eeepc4G.log
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso $next/kanotix32-slowfire-nightly-eeepc4G.iso
        ln -s $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso.zsync $next/kanotix32-slowfire-nightly-eeepc4G.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-slowfire-nightly-${d}${v}-eeepc4G.iso.md5 > $next/kanotix32-slowfire-nightly-eeepc4G.iso.md5
fi

fi # end of bookworm build

################### SPEEDFIRE  ###################

if $BUILD_BULLSEYE; then
git checkout auto/config
DISTRO=bullseye
rm -rf cache tmpfs/cache
sed -i 's/\(export LB_DISTRIBUTION=\).*/\1"'$DISTRO'"/' auto/config

# eeepc4G with LXDE
lb clean
lb config -d $DISTRO -p "kanotix-eeepc4G netsurf-gtk" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix speedfire-nightly Speedfire32 $d$v eeepc4G > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.packages
cp tmpfs/binary.log $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.log
cd $target
if [ ! -f kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso ]; then
        cd -
        ln -s $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-speedfire-nightly-eeepc4G.log
else
        md5sum -b kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso > kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso.md5
        zsyncmake kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso
        cd -
        ln -s $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.packages $next/kanotix32-speedfire-nightly-eeepc4G.packages
        ln -s $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-speedfire-nightly-eeepc4G.log
        ln -s $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso $next/kanotix32-speedfire-nightly-eeepc4G.iso
        ln -s $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso.zsync $next/kanotix32-speedfire-nightly-eeepc4G.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-speedfire-nightly-${d}${v}-eeepc4G.iso.md5 > $next/kanotix32-speedfire-nightly-eeepc4G.iso.md5
fi
fi # end of bullseye build

################### SILVERFIRE ###################

if $BUILD_BUSTER; then
git checkout auto/config
DISTRO=buster
rm -rf cache tmpfs/cache
sed -i 's/\(export LB_DISTRIBUTION=\).*/\1"'$DISTRO'"/' auto/config
if $BUILD_BUSTER_EXTRA_KDE; then
#
# kde 64-extra
lb clean
lb config -d $DISTRO -p "kanotix-kde-master silverfire-extra firefox google-chrome android virtualbox wine-staging skypeforlinux" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire64 $d$v KDE-extra > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.packages
cp tmpfs/binary.log $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.log
cd $target
if [ ! -f kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso ]; then
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.log $next/kanotix64-silverfire-nightly-KDE-extra.log
else
        md5sum -b kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso > kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso.md5
        zsyncmake kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.packages $next/kanotix64-silverfire-nightly-KDE-extra.packages
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.log $next/kanotix64-silverfire-nightly-KDE-extra.log
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso $next/kanotix64-silverfire-nightly-KDE-extra.iso
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso.zsync $next/kanotix64-silverfire-nightly-KDE-extra.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-silverfire-nightly-${d}${v}-KDE-extra.iso.md5 > $next/kanotix64-silverfire-nightly-KDE-extra.iso.md5
fi
fi # end of kde extra

if $BUILD_BUSTER_EXTRA_LXDE; then
#
# lxde 64-extra
lb clean
lb config -d $DISTRO -p "kanotix-lxde-master silverfire-extra firefox google-chrome android virtualbox wine-staging skypeforlinux" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire64 $d$v LXDE-extra > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.packages
cp tmpfs/binary.log $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.log
cd $target
if [ ! -f kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso ]; then
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.log $next/kanotix64-silverfire-nightly-LXDE-extra.log
else
        md5sum -b kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso > kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso.md5
        zsyncmake kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.packages $next/kanotix64-silverfire-nightly-LXDE-extra.packages
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.log $next/kanotix64-silverfire-nightly-LXDE-extra.log
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso $next/kanotix64-silverfire-nightly-LXDE-extra.iso
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso.zsync $next/kanotix64-silverfire-nightly-LXDE-extra.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-silverfire-nightly-${d}${v}-LXDE-extra.iso.md5 > $next/kanotix64-silverfire-nightly-LXDE-extra.iso.md5
fi
fi # end of lxde extra
#
# lxde 64
lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging skypeforlinux ndiswrapper" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire64 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix64-silverfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.log $next/kanotix64-silverfire-nightly-LXDE.log
else
        md5sum -b kanotix64-silverfire-nightly-${d}${v}-LXDE.iso > kanotix64-silverfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix64-silverfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.packages $next/kanotix64-silverfire-nightly-LXDE.packages
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.log $next/kanotix64-silverfire-nightly-LXDE.log
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.iso $next/kanotix64-silverfire-nightly-LXDE.iso
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix64-silverfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-silverfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix64-silverfire-nightly-LXDE.iso.md5
fi
#
# lxde 32
lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging ndiswrapper" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire32 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix32-silverfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.log $next/kanotix32-silverfire-nightly-LXDE.log
else
        md5sum -b kanotix32-silverfire-nightly-${d}${v}-LXDE.iso > kanotix32-silverfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix32-silverfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.packages $next/kanotix32-silverfire-nightly-LXDE.packages
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.log $next/kanotix32-silverfire-nightly-LXDE.log
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.iso $next/kanotix32-silverfire-nightly-LXDE.iso
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix32-silverfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-silverfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix32-silverfire-nightly-LXDE.iso.md5
fi
#
# kde 64
lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging skypeforlinux ndiswrapper" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire64 $d$v KDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-silverfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-silverfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix64-silverfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix64-silverfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE.log $next/kanotix64-silverfire-nightly-KDE.log
else
        md5sum -b kanotix64-silverfire-nightly-${d}${v}-KDE.iso > kanotix64-silverfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix64-silverfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE.packages $next/kanotix64-silverfire-nightly-KDE.packages
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE.log $next/kanotix64-silverfire-nightly-KDE.log
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE.iso $next/kanotix64-silverfire-nightly-KDE.iso
        ln -s $target/kanotix64-silverfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix64-silverfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-silverfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix64-silverfire-nightly-KDE.iso.md5
fi
#
# kde 32
lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging ndiswrapper" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire32 $d$v KDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-silverfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-silverfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix32-silverfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix32-silverfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-KDE.log $next/kanotix32-silverfire-nightly-KDE.log
else
        md5sum -b kanotix32-silverfire-nightly-${d}${v}-KDE.iso > kanotix32-silverfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix32-silverfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-KDE.packages $next/kanotix32-silverfire-nightly-KDE.packages
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-KDE.log $next/kanotix32-silverfire-nightly-KDE.log
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-KDE.iso $next/kanotix32-silverfire-nightly-KDE.iso
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix32-silverfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-silverfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix32-silverfire-nightly-KDE.iso.md5
fi
#
# eeepc4G with LXDE
lb clean
lb config -d $DISTRO -p "kanotix-eeepc4G midori ndiswrapper" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix silverfire-nightly Silverfire32 $d$v eeepc4G > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.packages
cp tmpfs/binary.log $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.log
cd $target
if [ ! -f kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso ]; then
        cd -
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-silverfire-nightly-eeepc4G.log
else
        md5sum -b kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso > kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso.md5
        zsyncmake kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso
        cd -
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.packages $next/kanotix32-silverfire-nightly-eeepc4G.packages
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-silverfire-nightly-eeepc4G.log
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso $next/kanotix32-silverfire-nightly-eeepc4G.iso
        ln -s $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso.zsync $next/kanotix32-silverfire-nightly-eeepc4G.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-silverfire-nightly-${d}${v}-eeepc4G.iso.md5 > $next/kanotix32-silverfire-nightly-eeepc4G.iso.md5
fi
fi # end of buster build

################### STEELFIRE ###################

if $BUILD_STRETCH; then
git checkout auto/config
DISTRO=stretch
rm -rf cache tmpfs/cache
sed -i 's/\(export LB_DISTRIBUTION=\).*/\1"'$DISTRO'"/' auto/config

# lxde 64
lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix steelfire-nightly Steelfire64 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix64-steelfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.log $next/kanotix64-steelfire-nightly-LXDE.log
else
        md5sum -b kanotix64-steelfire-nightly-${d}${v}-LXDE.iso > kanotix64-steelfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix64-steelfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.packages $next/kanotix64-steelfire-nightly-LXDE.packages
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.log $next/kanotix64-steelfire-nightly-LXDE.log
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.iso $next/kanotix64-steelfire-nightly-LXDE.iso
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix64-steelfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-steelfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix64-steelfire-nightly-LXDE.iso.md5
fi
#
# lxde 32
lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix steelfire-nightly Steelfire32 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix32-steelfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.log $next/kanotix32-steelfire-nightly-LXDE.log
else
        md5sum -b kanotix32-steelfire-nightly-${d}${v}-LXDE.iso > kanotix32-steelfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix32-steelfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.packages $next/kanotix32-steelfire-nightly-LXDE.packages
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.log $next/kanotix32-steelfire-nightly-LXDE.log
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.iso $next/kanotix32-steelfire-nightly-LXDE.iso
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix32-steelfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-steelfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix32-steelfire-nightly-LXDE.iso.md5
fi
#
# kde 64
lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix steelfire-nightly Steelfire64 $d$v KDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-steelfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-steelfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix64-steelfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix64-steelfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-KDE.log $next/kanotix64-steelfire-nightly-KDE.log
else
        md5sum -b kanotix64-steelfire-nightly-${d}${v}-KDE.iso > kanotix64-steelfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix64-steelfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-KDE.packages $next/kanotix64-steelfire-nightly-KDE.packages
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-KDE.log $next/kanotix64-steelfire-nightly-KDE.log
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-KDE.iso $next/kanotix64-steelfire-nightly-KDE.iso
        ln -s $target/kanotix64-steelfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix64-steelfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-steelfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix64-steelfire-nightly-KDE.iso.md5
fi
#
# kde 32
lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix steelfire-nightly Steelfire32 $d$v KDE > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-steelfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-steelfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix32-steelfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix32-steelfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-KDE.log $next/kanotix32-steelfire-nightly-KDE.log
else
        md5sum -b kanotix32-steelfire-nightly-${d}${v}-KDE.iso > kanotix32-steelfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix32-steelfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-KDE.packages $next/kanotix32-steelfire-nightly-KDE.packages
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-KDE.log $next/kanotix32-steelfire-nightly-KDE.log
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-KDE.iso $next/kanotix32-steelfire-nightly-KDE.iso
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix32-steelfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-steelfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix32-steelfire-nightly-KDE.iso.md5
fi
#
# eeepc4G with LXDE
lb clean
lb config -d $DISTRO -p "kanotix-eeepc4G midori" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix steelfire-nightly Steelfire32 $d$v eeepc4G > config/chroot_local-includes/etc/kanotix-version
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.packages
cp tmpfs/binary.log $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.log
cd $target
if [ ! -f kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso ]; then
        cd -
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-steelfire-nightly-eeepc4G.log
else
        md5sum -b kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso > kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso.md5
        zsyncmake kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso
        cd -
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.packages $next/kanotix32-steelfire-nightly-eeepc4G.packages
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.log $next/kanotix32-steelfire-nightly-eeepc4G.log
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso $next/kanotix32-steelfire-nightly-eeepc4G.iso
        ln -s $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso.zsync $next/kanotix32-steelfire-nightly-eeepc4G.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-steelfire-nightly-${d}${v}-eeepc4G.iso.md5 > $next/kanotix32-steelfire-nightly-eeepc4G.iso.md5
fi
fi # end of stretch build

################### SPITFIRE ###################

if $BUILD_JESSIE; then
git checkout auto/config
DISTRO=jessie
rm -rf cache tmpfs/cache
sed -i 's/\(export LB_DISTRIBUTION=\).*/\1"'$DISTRO'"/' auto/config

lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging skypeforlinux" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix spitfire-nightly Spitfire64 $d$v KDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-spitfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-spitfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix64-spitfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix64-spitfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE.log $next/kanotix64-spitfire-nightly-KDE.log
else
        md5sum -b kanotix64-spitfire-nightly-${d}${v}-KDE.iso > kanotix64-spitfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix64-spitfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE.packages $next/kanotix64-spitfire-nightly-KDE.packages
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE.log $next/kanotix64-spitfire-nightly-KDE.log
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE.iso $next/kanotix64-spitfire-nightly-KDE.iso
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix64-spitfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-spitfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix64-spitfire-nightly-KDE.iso.md5
fi

lb clean
lb config -d $DISTRO -p "kanotix-kde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix spitfire-nightly Spitfire32 $d$v KDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-spitfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-spitfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix32-spitfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix32-spitfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE.log $next/kanotix32-spitfire-nightly-KDE.log
else
        md5sum -b kanotix32-spitfire-nightly-${d}${v}-KDE.iso > kanotix32-spitfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix32-spitfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE.packages $next/kanotix32-spitfire-nightly-KDE.packages
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE.log $next/kanotix32-spitfire-nightly-KDE.log
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE.iso $next/kanotix32-spitfire-nightly-KDE.iso
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix32-spitfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-spitfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix32-spitfire-nightly-KDE.iso.md5
fi

lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging skypeforlinux" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix spitfire-nightly Spitfire64 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix64-spitfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.log $next/kanotix64-spitfire-nightly-LXDE.log
else
        md5sum -b kanotix64-spitfire-nightly-${d}${v}-LXDE.iso > kanotix64-spitfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix64-spitfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.packages $next/kanotix64-spitfire-nightly-LXDE.packages
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.log $next/kanotix64-spitfire-nightly-LXDE.log
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.iso $next/kanotix64-spitfire-nightly-LXDE.iso
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix64-spitfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-spitfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix64-spitfire-nightly-LXDE.iso.md5
fi

lb clean
lb config -d $DISTRO -p "kanotix-lxde-master firefox wine-staging" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix spitfire-nightly Spitfire32 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix32-spitfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.log $next/kanotix32-spitfire-nightly-LXDE.log
else
        md5sum -b kanotix32-spitfire-nightly-${d}${v}-LXDE.iso > kanotix32-spitfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix32-spitfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.packages $next/kanotix32-spitfire-nightly-LXDE.packages
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.log $next/kanotix32-spitfire-nightly-LXDE.log
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.iso $next/kanotix32-spitfire-nightly-LXDE.iso
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix32-spitfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-spitfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix32-spitfire-nightly-LXDE.iso.md5
fi

## gfxdetect
#git checkout config/binary_grub/grub.cfg

if $BUILD_JESSIE_SPECIAL; then

lb clean
lb config -d $DISTRO -p "kanotix-master firefox wine-staging google-chrome skypeforlinux virtualbox android steam xbmc gfxdetect" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64 --initsystem systemd
echo Kanotix spitfire-nightly Spitfire64 $d$v KDE-special > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.packages
cp tmpfs/binary.log $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.log
cd $target
if [ ! -f kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso ]; then
        cd -
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.log $next/kanotix64-spitfire-nightly-KDE-special.log
else
        md5sum -b kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso > kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso.md5
        zsyncmake kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso
        cd -
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.packages $next/kanotix64-spitfire-nightly-KDE-special.packages
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.log $next/kanotix64-spitfire-nightly-KDE-special.log
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso $next/kanotix64-spitfire-nightly-KDE-special.iso
        ln -s $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso.zsync $next/kanotix64-spitfire-nightly-KDE-special.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-spitfire-nightly-${d}${v}-KDE-special.iso.md5 > $next/kanotix64-spitfire-nightly-KDE-special.iso.md5
fi

lb clean
lb config -d $DISTRO -p "kanotix-master firefox wine-staging google-chrome virtualbox android steam xbmc gfxdetect" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386 --initsystem systemd
echo Kanotix spitfire-nightly Spitfire32 $d$v KDE-special > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.packages
cp tmpfs/binary.log $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.log
cd $target
if [ ! -f kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso ]; then
        cd -
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.log $next/kanotix32-spitfire-nightly-KDE-special.log
else
        md5sum -b kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso > kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso.md5
        zsyncmake kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso
        cd -
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.packages $next/kanotix32-spitfire-nightly-KDE-special.packages
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.log $next/kanotix32-spitfire-nightly-KDE-special.log
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso $next/kanotix32-spitfire-nightly-KDE-special.iso
        ln -s $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso.zsync $next/kanotix32-spitfire-nightly-KDE-special.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-spitfire-nightly-${d}${v}-KDE-special.iso.md5 > $next/kanotix32-spitfire-nightly-KDE-special.iso.md5
fi
fi # end of jessie special build
fi # end of jessie build

################### Dragonfire ###################

if $BUILD_WHEEZY; then
git checkout auto/config
DISTRO=wheezy
rm -rf cache tmpfs/cache
sed -i 's/\(export LB_DISTRIBUTION=\).*/\1"'$DISTRO'"/' auto/config

lb clean
lb config -d wheezy -p "kanotix-kde-master firefox" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64
echo Kanotix dragonfire-nightly Dragonfire64 $d$v KDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix64-dragonfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.log $next/kanotix64-dragonfire-nightly-KDE.log
else
        md5sum -b kanotix64-dragonfire-nightly-${d}${v}-KDE.iso > kanotix64-dragonfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix64-dragonfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.packages $next/kanotix64-dragonfire-nightly-KDE.packages
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.log $next/kanotix64-dragonfire-nightly-KDE.log
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.iso $next/kanotix64-dragonfire-nightly-KDE.iso
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix64-dragonfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-dragonfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix64-dragonfire-nightly-KDE.iso.md5
fi

lb clean
lb config -d wheezy -p "kanotix-kde-master firefox" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386
echo Kanotix dragonfire-nightly Dragonfire32 $d$v KDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.packages
cp tmpfs/binary.log $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.log
cd $target
if [ ! -f kanotix32-dragonfire-nightly-${d}${v}-KDE.iso ]; then
        cd -
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.log $next/kanotix32-dragonfire-nightly-KDE.log
else
        md5sum -b kanotix32-dragonfire-nightly-${d}${v}-KDE.iso > kanotix32-dragonfire-nightly-${d}${v}-KDE.iso.md5
        zsyncmake kanotix32-dragonfire-nightly-${d}${v}-KDE.iso
        cd -
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.packages $next/kanotix32-dragonfire-nightly-KDE.packages
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.log $next/kanotix32-dragonfire-nightly-KDE.log
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.iso $next/kanotix32-dragonfire-nightly-KDE.iso
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.iso.zsync $next/kanotix32-dragonfire-nightly-KDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-dragonfire-nightly-${d}${v}-KDE.iso.md5 > $next/kanotix32-dragonfire-nightly-KDE.iso.md5
fi

lb clean
lb config -d wheezy -p "kanotix-lxde-master firefox" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a amd64
echo Kanotix dragonfire-nightly Dragonfire64 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix64.iso
check_iso
mv kanotix64.iso $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.log $next/kanotix64-dragonfire-nightly-LXDE.log
else
        md5sum -b kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso > kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.packages $next/kanotix64-dragonfire-nightly-LXDE.packages
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.log $next/kanotix64-dragonfire-nightly-LXDE.log
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso $next/kanotix64-dragonfire-nightly-LXDE.iso
        ln -s $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix64-dragonfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix64-dragonfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix64-dragonfire-nightly-LXDE.iso.md5
fi

lb clean
lb config -d wheezy -p "kanotix-lxde-master firefox" --bootloader grub2 --tmpfs true --tmpfs-options size=16G --apt-http-proxy "http://127.0.0.1:3142" --cache-packages false --gfxoverlays false -a i386
echo Kanotix dragonfire-nightly Dragonfire32 $d$v LXDE > config/chroot_local-includes/etc/kanotix-version 
lb build; cd tmpfs; ./isohybrid-acritox kanotix32.iso
check_iso
mv kanotix32.iso $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso; cd ..
cp tmpfs/binary.packages $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.packages
cp tmpfs/binary.log $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.log
cd $target
if [ ! -f kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso ]; then
        cd -
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.log $next/kanotix32-dragonfire-nightly-LXDE.log
else
        md5sum -b kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso > kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso.md5
        zsyncmake kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso
        cd -
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.packages $next/kanotix32-dragonfire-nightly-LXDE.packages
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.log $next/kanotix32-dragonfire-nightly-LXDE.log
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso $next/kanotix32-dragonfire-nightly-LXDE.iso
        ln -s $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso.zsync $next/kanotix32-dragonfire-nightly-LXDE.iso.zsync
        sed "s/${d}${v}-//" $target/kanotix32-dragonfire-nightly-${d}${v}-LXDE.iso.md5 > $next/kanotix32-dragonfire-nightly-LXDE.iso.md5
fi
fi # end of wheezy build

git checkout auto/config

rm -rf $next/../latest
mv $next $next/../latest