"Fossies" - the Fresh Open Source Software Archive

Member "pp-2.14.3/tag.sh" (24 Nov 2021, 1080 Bytes) of package /linux/privat/pp-2.14.3.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/bash
    2 
    3 if [ -z "$1" ]
    4 then
    5     echo "$0 must be called by Makefile only."
    6     exit 1
    7 fi
    8 
    9 TAG=$1
   10 TMPTAG=/tmp/$(basename $TAG)
   11 
   12 cat <<EOF > $TMPTAG
   13 {- Automatically generated by $0. Do not modify. -}
   14 
   15 {- PP
   16 
   17 Copyright (C) 2015-2021 Christophe Delord
   18 
   19 http://cdelord.fr/pp
   20 
   21 This file is part of PP.
   22 
   23 PP is free software: you can redistribute it and/or modify
   24 it under the terms of the GNU General Public License as published by
   25 the Free Software Foundation, either version 3 of the License, or
   26 (at your option) any later version.
   27 
   28 PP is distributed in the hope that it will be useful,
   29 but WITHOUT ANY WARRANTY; without even the implied warranty of
   30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   31 GNU General Public License for more details.
   32 
   33 You should have received a copy of the GNU General Public License
   34 along with PP.  If not, see <http://www.gnu.org/licenses/>.
   35 -}
   36 
   37 module Tag(describe) where
   38 
   39 describe :: String
   40 describe = "$(git describe --tags || awk '$1=="version:" { print $2 }' pp.cabal)"
   41 
   42 EOF
   43 
   44 diff -q $TMPTAG $TAG >/dev/null 2>&1 || cp $TMPTAG $TAG