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

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

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


--- emacs/lib-src/rcs-checkin	2005-09-03 01:24:01 +0600
+++ emacs/lib-src/rcs-checkin.nodep	2005-09-03 02:06:23 +0600
@@ -43,6 +43,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 ..."
@@ -50,6 +55,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='[^ ][^ ]*  *[^ ][^ ]*  *\([^ ][^ ]*\)'
 
@@ -68,8 +79,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=`
@@ -106,14 +117,14 @@
 		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
 
 # arch-tag: 89c86949-ef04-4380-838b-bc1444dcb074
 
design & coding: Vladimir Lettiev aka crux © 2004-2005