Changeset 50836740 for git-version.sh


Ignore:
Timestamp:
10/16/2021 08:17:34 PM (3 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
82b7eff2
Parents:
49661ec
git-author:
Xi Ruoyao <xry111@…> (10/16/2021 07:53:42 PM)
git-committer:
Xi Ruoyao <xry111@…> (10/16/2021 08:17:34 PM)
Message:

merge conditional XML from LFS

There was some consistency issues in URLs to LFS. For example, in
systemd revision the URL to LFS "General Network Configuration" points
to the sysv book, this can be really troubling to new readers.

Instead of fixing them one by one, merge conditional XML developed by
Pierre from LFS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • git-version.sh

    r49661ec r50836740  
    11#!/bin/sh
     2
     3if [ "$1" = sysv ]; then
     4        SYSV="INCLUDE"
     5        SYSTEMD="IGNORE "
     6elif [ "$1" = systemd ]; then
     7        SYSV="IGNORE "
     8        SYSTEMD="INCLUDE"
     9else
     10        echo You must provide either \"sysv\" or \"systemd\" as argument
     11        exit 1
     12fi
     13
     14echo "<!ENTITY % sysv    \"$SYSV\">"     >  conditional.ent
     15echo "<!ENTITY % systemd \"$SYSTEMD\">"  >> conditional.ent
    216
    317if ! git status > /dev/null; then
    418        # Either it's not a git repository, or git is unavaliable.
    519        # Just workaround.
    6         echo "<!ENTITY day               \"??\">"              >  version.ent
    7         echo "<!ENTITY month             \"??\">"              >> version.ent
    8         echo "<!ENTITY year              \"????\">"            >> version.ent
    9         echo "<!ENTITY copyrightdate     \"1999-2021\">"       >> version.ent
     20        echo "<!ENTITY year              \"????\">"            >  version.ent
    1021        echo "<!ENTITY version           \"unknown\">"         >> version.ent
    1122        echo "<!ENTITY releasedate       \"unknown\">"         >> version.ent
     
    2233year=$(date --date "$commit_date" "+%Y")
    2334month=$(date --date "$commit_date" "+%B")
    24 month_digit=$(date --date "$commit_date" "+%m")
    2535day_digit=$(date --date "$commit_date" "+%d")
    2636day=$(echo $day_digit | sed 's/^0//')
     
    4252fi
    4353
    44 echo "<!ENTITY day               \"$day_digit\">"          >  version.ent
    45 echo "<!ENTITY month             \"$month_digit\">"        >> version.ent
    46 echo "<!ENTITY year              \"$year\">"               >> version.ent
    47 echo "<!ENTITY copyrightdate     \"2001-$year\">"          >> version.ent
     54echo "<!ENTITY year              \"$year\">"               >  version.ent
    4855echo "<!ENTITY version           \"$version\">"            >> version.ent
    4956echo "<!ENTITY releasedate       \"$full_date\">"          >> version.ent
Note: See TracChangeset for help on using the changeset viewer.