diff --git a/.gitignore b/.gitignore index 38f7dfe1..f1e69208 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ tests/clover.xml webodf/* -build/* \ No newline at end of file +build/* +online +loolvm diff --git a/README.md b/README.md index c7c345c4..a7851768 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ If you don't want to mess around with dependencies, you need simply install `uno + Upload font files to **documents/css/fonts** directory + Edit **documents/css/fonts.css** adding `@font-face` rule for each uploaded file +### CloudSuite upgrade ### +Similar to WebODF upgrade below, but easier: + + ./src/updateWebODF.sh prepare + ./src/updateWebODF.sh copy + ### WebODF upgrade ### 1. Build WebODF: diff --git a/src/updateCloudSuite.sh b/src/updateCloudSuite.sh new file mode 100755 index 00000000..d313ac43 --- /dev/null +++ b/src/updateCloudSuite.sh @@ -0,0 +1,73 @@ +#!/bin/bash +# Copies the needed files from the build dir of the WebODF pullbox branch +# +# Prepare the webodf build dir by calling: make webodf-debug.js-target editor-compiled.js-target + +if [ ! -e "README.md" ]; then + echo "Call me in the toplevel dir of OwnCloud Documents." + exit 1 +fi + +if [ $# -lt 1 ]; then + echo "Usage : $0 prepare|copy|patch" + exit 1 +fi + +LOLEAFLET_SRCDIR='online/loleaflet/' +CLOUDSUITE_SRCDIR='loolvm/looldemo/assets/' + +JS_TARGET='js/3rdparty/cloudsuite/' + +# create folders +function prepare(){ + if [ ! -d "$LOLEAFLET_SRCDIR" ]; then + git clone git://anongit.freedesktop.org/libreoffice/online + ( cd online/loleaflet && npm install ) || exit 1 + else + pushd "$LOLEAFLET_SRCDIR" + git pull --rebase + popd + fi + + if [ ! -d "$CLOUDSUITE_SRCDIR" ]; then + git clone ssh://git.internal.collabora.co.uk/git/productivity/loolvm.git + else + pushd "$CLOUDSUITE_SRCDIR" + git pull --rebase + popd + fi + + ( cd "$LOLEAFLET_SRCDIR" && jake build && cd plugins/draw-0.2.4/ && jake build ) || exit 1 +} + +# copy sources +function copy_sources(){ + mkdir -p "$JS_TARGET" + + # loleaflet + cp "$LOLEAFLET_SRCDIR"/dist/leaflet.js "$JS_TARGET" + cp "$LOLEAFLET_SRCDIR"/plugins/draw-0.2.4/dist/leaflet.draw.js "$JS_TARGET" + + # loleaflet deps + cp "$LOLEAFLET_SRCDIR"/dist/dialog/vex.combined.min.js "$JS_TARGET" + cp "$LOLEAFLET_SRCDIR"/src/scrollbar/jquery.mCustomScrollbar.js "$JS_TARGET" + + # cloudsuite + cp "$CLOUDSUITE_SRCDIR"/toolbar/cloudsuite.js "$JS_TARGET" + cp "$CLOUDSUITE_SRCDIR"/toolbar/select2.min.js "$JS_TARGET" + cp "$CLOUDSUITE_SRCDIR"/toolbar/w2ui.min.js "$JS_TARGET" +} + +# patches against upstream +function patch_sources(){ + echo "Nothing for CloudSuite..." +} + +case "$1" in + 'prepare' ) + prepare ;; + 'copy' ) + copy_sources ;; + 'patch' ) + patch_sources ;; +esac