Changeset View
Changeset View
Standalone View
Standalone View
sys/conf/newvers.sh
Show All 40 Lines | |||||
# different hosts to produce identical output. | # different hosts to produce identical output. | ||||
# | # | ||||
# -R Reproducible build if the tree represents an unmodified | # -R Reproducible build if the tree represents an unmodified | ||||
# checkout from a version control system. Metadata is | # checkout from a version control system. Metadata is | ||||
# included if the tree is modified. | # included if the tree is modified. | ||||
TYPE="FreeBSD" | TYPE="FreeBSD" | ||||
REVISION="13.0" | REVISION="13.0" | ||||
BRANCH="CURRENT" | BRANCH=${BRANCH_OVERRIDE:-CURRENT} | ||||
emaste: ✓ | |||||
if [ -n "${BRANCH_OVERRIDE}" ]; then | |||||
BRANCH=${BRANCH_OVERRIDE} | |||||
fi | |||||
RELEASE="${REVISION}-${BRANCH}" | RELEASE="${REVISION}-${BRANCH}" | ||||
VERSION="${TYPE} ${RELEASE}" | VERSION="${TYPE} ${RELEASE}" | ||||
# | # | ||||
# findvcs dir | # findvcs dir | ||||
# Looks up directory dir at world root and up the filesystem | # Looks up directory dir at world root and up the filesystem | ||||
# | # | ||||
findvcs() | findvcs() | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | git_tree_modified() | ||||
return 1 | return 1 | ||||
} | } | ||||
if [ -z "${SYSDIR}" ]; then | if [ -z "${SYSDIR}" ]; then | ||||
SYSDIR=$(dirname $0)/.. | SYSDIR=$(dirname $0)/.. | ||||
fi | fi | ||||
if [ -n "${PARAMFILE}" ]; then | RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) | ||||
emasteUnsubmitted Not Done Inline Actions✓ emaste: ✓
but this line looks too long? | |||||
impAuthorUnsubmitted Done Inline ActionsOther lines are longer. imp: Other lines are longer.
| |||||
emasteUnsubmitted Not Done Inline ActionsStill better to not introduce new >80 col lines though... there are three > 80 cols right now, all of which are awkward to wrap to 80. emaste: Still better to not introduce new >80 col lines though... there are three > 80 cols right now… | |||||
RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ | |||||
${PARAMFILE}) | |||||
else | |||||
RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ | |||||
${SYSDIR}/sys/param.h) | |||||
fi | |||||
b=share/examples/etc/bsd-style-copyright | b=share/examples/etc/bsd-style-copyright | ||||
if [ -r "${SYSDIR}/../COPYRIGHT" ]; then | if [ -r "${SYSDIR}/../COPYRIGHT" ]; then | ||||
year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) | year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) | ||||
else | else | ||||
year=$(date +%Y) | year=$(date +%Y) | ||||
fi | fi | ||||
# look for copyright template | # look for copyright template | ||||
Show All 20 Lines | |||||
fi | fi | ||||
# add newline | # add newline | ||||
COPYRIGHT="$COPYRIGHT | COPYRIGHT="$COPYRIGHT | ||||
" | " | ||||
# VARS_ONLY means no files should be generated, this is just being | # VARS_ONLY means no files should be generated, this is just being | ||||
# included. | # included. | ||||
if [ -n "$VARS_ONLY" ]; then | [ -n "$VARS_ONLY" ] && return 0 | ||||
emasteUnsubmitted Not Done Inline Actionseww emaste: eww | |||||
allanjudeUnsubmitted Not Done Inline ActionsThis is a pretty common shell construct, I think it is fine. allanjude: This is a pretty common shell construct, I think it is fine. | |||||
emasteUnsubmitted Not Done Inline ActionsAgreed, it's fine, I just don't like it :) emaste: Agreed, it's fine, I just don't like it :) | |||||
return 0 | |||||
fi | |||||
LC_ALL=C; export LC_ALL | LC_ALL=C; export LC_ALL | ||||
if [ ! -r version ] | if [ ! -r version ] | ||||
then | then | ||||
echo 0 > version | echo 0 > version | ||||
fi | fi | ||||
touch version | touch version | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |
✓