File: build-final-ckeditor.sh

package info (click to toggle)
request-tracker5 5.0.3%2Bdfsg-3~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 77,648 kB
  • sloc: javascript: 187,930; perl: 79,061; sh: 1,302; makefile: 471; python: 37; php: 15
file content (45 lines) | stat: -rwxr-xr-x 1,353 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
#
# Run first: apt-get install ckbuilder

set -e

THIRD_PARTY_DIR=third-party-source/devel/third-party
SRC=$THIRD_PARTY_DIR/ckeditor-src
SKINSRC=$THIRD_PARTY_DIR/bootstrapck-src
CCMSCONFIGHELPERSRC=$THIRD_PARTY_DIR/ccmsconfighelper
CONFIGHELPERSRC=$THIRD_PARTY_DIR/confighelper-src
DOCFONTSRC=$THIRD_PARTY_DIR/docfont
DEST=ckeditor-build
FINALDEST=share/static/RichText
BUILD_CONFIG=$THIRD_PARTY_DIR/ckeditor-4.13.0/build-config.js

rm -rf $DEST

## Copy aux sources into main source

mkdir $SRC/skins
cp -a $SKINSRC/skins/bootstrapck $SRC/skins/
cp -a $CCMSCONFIGHELPERSRC $SRC/plugins/
cp -a $CONFIGHELPERSRC $SRC/plugins/confighelper
cp -a $DOCFONTSRC $SRC/plugins/

# --add-exports is from https://github.com/ckeditor/ckbuilder/issues/34
java --add-exports java.desktop/sun.java2d=ALL-UNNAMED -jar /usr/bin/ckbuilder \
    --build $SRC $DEST --skip-omitted-in-build --build-config $BUILD_CONFIG

(
    cd $DEST/ckeditor
    rm -rf .github CHANGES.md LICENSE.md README.md samples
    mv ckeditor.js ckeditor.min.js
)

## Copy results into final location

# Preserve customised config file
cp -p $FINALDEST/{config.js,contents.css,contents-dark.css} $DEST/ckeditor/
rm -rf $FINALDEST
cp -a $DEST/ckeditor/ $FINALDEST/
rm -rf $DEST

rm -rf $SRC/skins/bootstrapck $SRC/plugins/ccmsconfighelper $SRC/plugins/confighelper $SRC/plugins/docfont