"Fossies" - the Fresh Open Source Software Archive

Member "octavia-8.0.0/tools/misc-sanity-checks.sh" (14 Apr 2021, 1254 Bytes) of package /linux/misc/openstack/octavia-8.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/sh
    2 
    3 # Copyright (C) 2014 VA Linux Systems Japan K.K.
    4 # Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp>
    5 # All Rights Reserved.
    6 #
    7 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
    8 #    not use this file except in compliance with the License. You may obtain
    9 #    a copy of the License at
   10 #
   11 #         http://www.apache.org/licenses/LICENSE-2.0
   12 #
   13 #    Unless required by applicable law or agreed to in writing, software
   14 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
   15 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   16 #    License for the specific language governing permissions and limitations
   17 #    under the License.
   18 
   19 TMPDIR=`mktemp -d /tmp/${0##*/}.XXXXXX` || exit 1
   20 export TMPDIR
   21 trap "rm -rf $TMPDIR" EXIT
   22 
   23 FAILURES=$TMPDIR/failures
   24 
   25 
   26 check_pot_files_errors () {
   27     find octavia -type f -regex '.*\.pot?' \
   28         -print0|xargs -0 -n 1 --no-run-if-empty msgfmt \
   29         --check-format -o /dev/null
   30     if [ "$?" -ne 0 ]; then
   31         echo "PO files syntax is not correct!" >>$FAILURES
   32     fi
   33 }
   34 
   35 # Add your checks here...
   36 check_pot_files_errors
   37 
   38 # Fail, if there are emitted failures
   39 if [ -f $FAILURES ]; then
   40     cat $FAILURES
   41     exit 1
   42 fi