Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1494140
 поиск   регистрация   авторизация 
 
Группа :: Редакторы
Пакет: emacs21

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: emacs-21.2-hide-rcs-deps.patch


--- emacs-21.2/lib-src/rcs-checkin.orig	2002-07-20 08:17:24 +0400
+++ emacs-21.2/lib-src/rcs-checkin	2002-07-20 08:29:15 +0400
@@ -42,6 +42,11 @@
 # which likes to use RCS as its back end.  It was written by Paul Eggert
 # and revised/documented for use with VC by Eric S. Raymond, Mar 19 1993.
 
+# Hide rcs-dependencios from bash and RPM:
+RCS=rcs
+RLOG=rlog
+CI=ci
+
 case $# in
 0)
 	echo "rcs-checkin: usage: rcs-checkin file ..."
@@ -49,6 +54,12 @@
 	echo "rcs-checkin: function: uses the file's first line for the description"
 esac
 
+for e in "$RCS" "$RLOG" "$CI"; do
+    if ! which "$e" &>/dev/null; then
+	echo >&2 $"You may want/need to install rcs package to use this script."
+	break
+    fi
+done
 # expr pattern to extract owner from ls -l output
 ls_owner_pattern='[^ ][^ ]*  *[^ ][^ ]*  *\([^ ][^ ]*\)'
 
@@ -67,8 +78,8 @@
 
 	# If the RCS file does not already exist,
 	# initialize it with a description from $file's first line.
-	rlog -R "$file" >/dev/null 2>&1 ||
-	rcs -i -q -t-"`sed 1q $file`" "$file" || exit
+	"$RLOG" -R "$file" >/dev/null 2>&1 ||
+	"$RCS" -i -q -t-"`sed 1q $file`" "$file" || exit
 
 	# Get list of old files.
 	oldfiles=`
@@ -105,13 +116,13 @@
 		mv "$oldfile" "$file" || exit
 		ls_l=`ls -l "$file"` || exit
 		owner=-w`expr " $ls_l" : " $ls_owner_pattern"` || owner=
-		echo "Formerly ${oldfile}" | ci -d -l -q $owner "$file" || exit
+		echo "Formerly ${oldfile}" | "$CI" -d -l -q $owner "$file" || exit
 	done
 
 	# Bring $file back from $file.~-~, and check it in.
 	mv "$file.~-~" "$file" || exit
 	ls_l=`ls -l "$file"` || exit
 	owner=-w`expr " $ls_l" : " $ls_owner_pattern"` || owner=
-	ci -d -q -u $owner -m"entered into RCS" "$file" || exit
+	"$CI" -d -q -u $owner -m"entered into RCS" "$file" || exit
 done
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005