From c2d432e402309cc5900a3a895afc3483b1c89a50 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 30 May 2015 14:42:43 +0200 Subject: [PATCH 087/257] sys/conf/newvers.sh: Ditch support for p4 (non-free) and hg (not relevant for ElectroBSD) Obtained from: ElectroBSD --- sys/conf/newvers.sh | 49 ++----------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 7c9c0474d218..c28bb4aeabba 100755 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -153,11 +153,6 @@ if [ -z "${svnversion}" ] && [ -x /usr/bin/svnliteversion ] ; then fi fi -for dir in /usr/bin /usr/local/bin; do - if [ -x "${dir}/p4" ] && [ -z ${p4_cmd} ] ; then - p4_cmd=${dir}/p4 - fi -done if [ -d "${SYSDIR}/../.git" ] ; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/git" ] ; then @@ -167,15 +162,6 @@ if [ -d "${SYSDIR}/../.git" ] ; then done fi -if [ -d "${SYSDIR}/../.hg" ] ; then - for dir in /usr/bin /usr/local/bin; do - if [ -x "${dir}/hg" ] ; then - hg_cmd="${dir}/hg -R ${SYSDIR}/.." - break - fi - done -fi - if [ -n "$svnversion" ] ; then svn=`cd ${SYSDIR} && $svnversion 2>/dev/null` case "$svn" in @@ -224,37 +210,6 @@ if [ -n "$git_cmd" ] ; then fi fi -if [ -n "$p4_cmd" ] ; then - p4version=`cd ${SYSDIR} && $p4_cmd changes -m1 "./...#have" 2>&1 | \ - awk '{ print $2 }'` - case "$p4version" in - [0-9]*) - p4version=" ${p4version}" - p4opened=`cd ${SYSDIR} && $p4_cmd opened ./... 2>&1` - case "$p4opened" in - File*) ;; - //*) - p4version="${p4version}+edit" - modified=true - ;; - esac - ;; - *) unset p4version ;; - esac -fi - -if [ -n "$hg_cmd" ] ; then - hg=`$hg_cmd id 2>/dev/null` - svn=`$hg_cmd svn info 2>/dev/null | \ - awk -F': ' '/Revision/ { print $2 }'` - if [ -n "$svn" ] ; then - svn=" r${svn}" - fi - if [ -n "$hg" ] ; then - hg=" ${hg}" - fi -fi - include_metadata=true while getopts rR opt; do case "$opt" in @@ -270,10 +225,10 @@ done shift $((OPTIND - 1)) if [ -z "${include_metadata}" ]; then - VERINFO="${VERSION} ${svn}${git}${hg}${p4version}" + VERINFO="${VERSION} ${svn}${git}" VERSTR="${VERINFO}\\n" else - VERINFO="${VERSION} #${v}${svn}${git}${hg}${p4version}: ${t}" + VERINFO="${VERSION} #${v}${svn}${git}: ${t}" VERSTR="${VERINFO}\\n ${u}@${h}:${d}\\n" fi -- 2.11.0