#!/usr/bin/env bash if [ -n "$debug" ] ; then set -x fi BIN_DIR=$(dirname "$0") CORE_DIR=$(realpath "$BIN_DIR/..") GEN_BZ2=false GEN_MD5=false GEN_XZ=false OUT_DIR="${CORE_DIR?}" VERSION= usage() { cat < ] [ --core-dir=.tar.[bz2|xz] EOF } while [ "${1}" != "" ]; do parm=${1%%=*} arg=${1#*=} has_arg= if [ "${1}" != "${parm?}" ] ; then has_arg=1 else arg="" fi # echo "parm=!${parm}!" # echo "arg=!${arg}!" case "${parm}" in -2|--bz2) GEN_BZ2=true ;; -x|--xz) GEN_XZ=true ;; -5|--md5) GEN_MD5=true ;; -o|--output-dir) if [ -z "${has_arg}" ] ; then shift; arg="$1" fi if [ -z "${arg}" ] ; then echo "Missing argument for option $parm" 1>&2 exit -1 else OUT_DIR="$arg" fi ;; -v|--version) if [ -z "${has_arg}" ] ; then shift; arg="$1" fi if [ -z "${arg}" ] ; then echo "Missing argument for option $parm" 1>&2 exit -1 else VERSION="$arg" fi ;; -h|--help) usage exit 0 ;; -*) echo "Invalid option $1" 1>&2 exit -1 ;; *) if [ -z "${LABEL}" ] ; then LABEL="$parm" else echo "Too many arguments.. $@" 1>&2 exit -1 fi ;; esac shift done # we need a label if [ -z "${LABEL}" ] ; then echo "Missing argument. We need a git label as source" 1>&2 exit 1 fi # default to xz compression if ! ${GEN_BZ2?} && ! ${GEN_XZ?} ; then GEN_XZ=true fi # --version= is mandatory if [ -z "${VERSION}" ] ; then VERSION="${LABEL?}" fi base_name="libreoffice-${VERSION}" # --output-dir default to core-dir if [ -z "${OUT_DIR}" ] ; then OUT_DIR="$CORE_DIR?}" fi if [ ! -d "${CORE_DIR?}" ] ; then echo "Core repo directory $CORE_DIR does not exist or is not a directory" 1>&2 exit 1 fi if [ ! -d "${CORE_DIR?}/.git" ] ; then echo "Core repo $CORE_DIR is not a git repo" 1>&2 exit 1 fi if [ ! -d "${OUT_DIR?}" ] ; then echo "Output directory $OUT_DIR does not exist or is not a directory" 1>&2 exit 1 fi pushd "${CORE_DIR}" > /dev/null echo "archiving core..." git archive --format=tar --prefix="${base_name?}/" -o "${OUT_DIR}/${base_name}.tar" ${LABEL?} concatenate_list= for module in dictionaries helpcontent2 translations ; do if [ ! -f ${module?}/.git ] ; then echo "Warning: module $module is not present" 1>&2 else echo "archiving ${module?}..." git archive --format=tar --prefix="${base_name?}/${module?}" -o "${OUT_DIR}/${base_name}-${module?}.tar" ${LABEL?} concatenate_list="${concatenate_list?} ${OUT_DIR}/${base_name}-${module?}.tar" fi done if [ -n "${concatenate_list?}" ] ; then tar --concatenate --file="${OUT_DIR}/${base_name}.tar" ${concatenate_list?} rm ${concatenate_list?} fi if ${GEN_BZ2?} ; then echo "bzip2 compression..." bzip2 -fkz "${OUT_DIR}/${base_name}.tar" if ${GEN_MD5?} ; then echo "md5sum..." md5sum "${OUT_DIR}/${base_name}.tar.bz2" > "${OUT_DIR}/${base_name}.tar.bz2.md5" fi fi if ${GEN_XZ?} ; then echo "xz compression..." xz -fz "${OUT_DIR}/${base_name}.tar" if ${GEN_MD5?} ; then echo "md5sum..." md5sum "${OUT_DIR}/${base_name}.tar.xz" > "${OUT_DIR}/${base_name}.tar.zx.md5" fi else rm "${OUT_DIR}/${base_name}.tar" fi echo "Done." labora/libreoffice-7-5+backports'>distro/collabora/libreoffice-7-5+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15Optimize NestedKeyImpl::openKeysArkadiy Illarionov
* Use const methods of Sequence * Get rid of extra loop over localSeq * Simplify default keys insert condition Change-Id: I112c0a53d3ebfc2ff54a4ac904e6e112beaf3cdd Reviewed-on: https://gerrit.libreoffice.org/77472 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-08-15loplugin:sequenceloop in starmath..svlNoel Grandin
Change-Id: I473a8eec9cbf6d44b55ffd6f2233bf39cf6217da Reviewed-on: https://gerrit.libreoffice.org/77528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): stocStephan Bergmann
Change-Id: Id739d5ff815d3bb1db48e9b1c2b3f739e3f11dfd Reviewed-on: https://gerrit.libreoffice.org/76644 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-22Simplify Sequence iterations in shell..svgioArkadiy Illarionov
Use range-based loops, STL and comphelper functions Change-Id: I612d36abcc09a91c60f7212de6747a1a1bdcfc69 Reviewed-on: https://gerrit.libreoffice.org/76056 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-05-20tdf#42949 Fix IWYU warnings in stoc/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I3c1b091d30449243faec3f875e6f0ac6d8b34259 Reviewed-on: https://gerrit.libreoffice.org/72214 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-12tdf#120703 PVS: remove redundant static castsMike Kaganski
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I5fee1c4bebd1972fbb5e43da37149d4e2ff6ce0d Reviewed-on: https://gerrit.libreoffice.org/67664 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-10loplugin:indentation in soltools..svlNoel Grandin
Change-Id: I270a12cdb68920b8fa23b82dd933724e30334485 Reviewed-on: https://gerrit.libreoffice.org/67565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-29loplugin:flatten in stoc..storeNoel Grandin
Change-Id: Ib8c86179a3d13852cbb02b389b6103aca5456dba Reviewed-on: https://gerrit.libreoffice.org/67013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>