mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Install onlyoffice-editor in install-onlyoffice.sh
This commit is contained in:
parent
c37dfb1eec
commit
41205d6285
@ -28,12 +28,12 @@ main() {
|
||||
set_prop oldest_needed_version v1
|
||||
|
||||
mkdir -p "$OO_DIR"
|
||||
install_version v1 4f370beb
|
||||
install_version v2b d9da72fd
|
||||
install_version v4 6ebc6938
|
||||
install_version v5 88a356f0
|
||||
install_version v6 abd8a309
|
||||
install_version v7 e1267803
|
||||
install_old_version v1 4f370beb
|
||||
install_old_version v2b d9da72fd
|
||||
install_old_version v4 6ebc6938
|
||||
install_old_version v5 88a356f0
|
||||
install_old_version v6 abd8a309
|
||||
install_version v7 v7.3.3.60+8 064ba9bc11f8e31d0de1b4698ff8c6876cbdb042a199821d180aac1f51b35a3394005309794c2c53ab74cf1e4e5c0bd2569fe133b8e9eef1fcb158f14b8fd0a1
|
||||
install_x2t v7.3+1 ab0c05b0e4c81071acea83f0c6a8e75f5870c360ec4abc4af09105dd9b52264af9711ec0b7020e87095193ac9b6e20305e446f2321a541f743626a598e5318c1
|
||||
|
||||
rm -rf "$BUILDS_DIR"
|
||||
@ -136,12 +136,11 @@ ensure_oo_is_downloaded() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_version() {
|
||||
install_old_version() {
|
||||
local DIR=$1
|
||||
local COMMIT=$2
|
||||
local FULL_DIR=$OO_DIR/$DIR
|
||||
local LAST_DIR
|
||||
LAST_DIR=$(pwd)
|
||||
local LAST_DIR=$(pwd)
|
||||
|
||||
if [ ! -e "$FULL_DIR"/.commit ] || [ "$(cat "$FULL_DIR"/.commit)" != "$COMMIT" ]; then
|
||||
ensure_oo_is_downloaded
|
||||
@ -165,6 +164,40 @@ install_version() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_version() {
|
||||
ensure_command_available curl
|
||||
ensure_command_available sha512sum
|
||||
ensure_command_available unzip
|
||||
|
||||
local DIR=$1
|
||||
local VERSION=$2
|
||||
local HASH=$3
|
||||
local FULL_DIR=$OO_DIR/$DIR
|
||||
local LAST_DIR=$(pwd)
|
||||
|
||||
if [ ! -e "$FULL_DIR"/.version ] || [ "$(cat "$FULL_DIR"/.version)" != "$VERSION" ]; then
|
||||
rm -rf "$FULL_DIR"
|
||||
mkdir -p "$FULL_DIR"
|
||||
|
||||
cd "$FULL_DIR"
|
||||
|
||||
curl "https://github.com/cryptpad/onlyoffice-editor/releases/download/$VERSION/onlyoffice-editor.zip" --location --output "onlyoffice-editor.zip"
|
||||
echo "$HASH onlyoffice-editor.zip" >onlyoffice-editor.zip.sha512
|
||||
if ! sha512sum --check onlyoffice-editor.zip.sha512; then
|
||||
echo "onlyoffice-editor.zip does not match expected checksum"
|
||||
exit 1
|
||||
fi
|
||||
unzip onlyoffice-editor.zip
|
||||
rm onlyoffice-editor.zip*
|
||||
|
||||
echo "$VERSION" >"$FULL_DIR"/.version
|
||||
|
||||
echo "$DIR updated"
|
||||
else
|
||||
echo "$DIR was up to date"
|
||||
fi
|
||||
}
|
||||
|
||||
install_x2t() {
|
||||
ensure_command_available curl
|
||||
ensure_command_available sha512sum
|
||||
@ -183,7 +216,6 @@ install_x2t() {
|
||||
cd "$X2T_DIR"
|
||||
|
||||
curl "https://github.com/cryptpad/onlyoffice-x2t-wasm/releases/download/$VERSION/x2t.zip" --location --output x2t.zip
|
||||
# curl "https://github.com/cryptpad/onlyoffice-x2t-wasm/releases/download/v7.3%2B1/x2t.zip" --location --output x2t.zip
|
||||
echo "$HASH x2t.zip" >x2t.zip.sha512
|
||||
if ! sha512sum --check x2t.zip.sha512; then
|
||||
echo "x2t.zip does not match expected checksum"
|
||||
|
||||
@ -101,7 +101,6 @@ define([
|
||||
var oldLocks = {};
|
||||
var myUniqueOOId;
|
||||
var myOOId;
|
||||
var sessionId = Hash.createChannelId();
|
||||
var cpNfInner;
|
||||
let integrationChannel;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user