12.0
12.1
12.2
gimp3
kea
ken/TL2024
ken/tuningfonts
lazarus
lxqt
plabs/newcss
python3.11
qt5new
rahul/power-profiles-daemon
renodr/vulkan-addition
trunk
xry111/for-12.3
xry111/llvm18
xry111/spidermonkey128
xry111/xf86-video-removal
Last change
on this file since 6e1854e9 was e3047fd, checked in by Pierre Labastie <pierre.labastie@…>, 21 months ago |
Restore the render system to what it was before pythonhosted changes
|
-
Property mode
set to
100755
|
File size:
1.7 KB
|
Rev | Line | |
---|
[17c9da8] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
[50836740] | 3 | if [ "$1" = sysv ]; then
|
---|
[4e207bb] | 4 | SYSV="INCLUDE"
|
---|
| 5 | SYSTEMD="IGNORE "
|
---|
[50836740] | 6 | elif [ "$1" = systemd ]; then
|
---|
[4e207bb] | 7 | SYSV="IGNORE "
|
---|
| 8 | SYSTEMD="INCLUDE"
|
---|
[50836740] | 9 | else
|
---|
[4e207bb] | 10 | echo You must provide either \"sysv\" or \"systemd\" as argument
|
---|
| 11 | exit 1
|
---|
[50836740] | 12 | fi
|
---|
| 13 |
|
---|
| 14 | echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent
|
---|
| 15 | echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent
|
---|
| 16 |
|
---|
[17c9da8] | 17 | if ! git status > /dev/null; then
|
---|
[4e207bb] | 18 | # Either it's not a git repository, or git is unavaliable.
|
---|
| 19 | # Just workaround.
|
---|
| 20 | echo "<!ENTITY year \"????\">" > version.ent
|
---|
| 21 | echo "<!ENTITY version \"unknown\">" >> version.ent
|
---|
| 22 | echo "<!ENTITY releasedate \"unknown\">" >> version.ent
|
---|
| 23 | echo "<!ENTITY pubdate \"unknown\">" >> version.ent
|
---|
| 24 | exit 0
|
---|
[17c9da8] | 25 | fi
|
---|
| 26 |
|
---|
| 27 | export LC_ALL=en_US.utf8
|
---|
[da5d81d2] | 28 | export TZ=America/Chicago
|
---|
[17c9da8] | 29 |
|
---|
[e3047fd] | 30 | commit_date=$(git show -s --format=format:"%cd" --date=local)
|
---|
[17c9da8] | 31 | short_date=$(date --date "$commit_date" "+%Y-%m-%d")
|
---|
| 32 |
|
---|
| 33 | year=$(date --date "$commit_date" "+%Y")
|
---|
| 34 | month=$(date --date "$commit_date" "+%B")
|
---|
| 35 | day_digit=$(date --date "$commit_date" "+%d")
|
---|
| 36 | day=$(echo $day_digit | sed 's/^0//')
|
---|
| 37 |
|
---|
| 38 | case $day in
|
---|
[4e207bb] | 39 | "1" | "21" | "31" ) suffix="st";;
|
---|
| 40 | "2" | "22" ) suffix="nd";;
|
---|
| 41 | "3" | "23" ) suffix="rd";;
|
---|
| 42 | * ) suffix="th";;
|
---|
[17c9da8] | 43 | esac
|
---|
| 44 |
|
---|
| 45 | full_date="$month $day$suffix, $year"
|
---|
| 46 |
|
---|
[e3047fd] | 47 | sha="$(git describe --abbrev=1)"
|
---|
[8025137] | 48 | version=$(echo "$sha" | sed 's/-g[^-]*$//')
|
---|
[17c9da8] | 49 |
|
---|
[e3047fd] | 50 | if [ "$(git diff HEAD | wc -l)" != "0" ]; then
|
---|
| 51 | version="$version+"
|
---|
| 52 | fi
|
---|
| 53 |
|
---|
[50836740] | 54 | echo "<!ENTITY year \"$year\">" > version.ent
|
---|
[17c9da8] | 55 | echo "<!ENTITY version \"$version\">" >> version.ent
|
---|
| 56 | echo "<!ENTITY releasedate \"$full_date\">" >> version.ent
|
---|
| 57 | echo "<!ENTITY pubdate \"$short_date\">" >> version.ent
|
---|
Note:
See
TracBrowser
for help on using the repository browser.