Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS update: Vanilla/rpm
Date: Wednesday July 14, 1999 @ 20:09
Author: tanner
Update of /home/netrek/cvsroot/Vanilla/rpm
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv12255/rpm
Modified Files:
cvs2rpm
Log Message:
Wed Jul 14 20:08:32 1999 Bob Tanner <tanner@real-time.com>
* rpm/cvs2rpm (RPM_SPEC_DIR): James and Carlos both do not have
cvs installed via rpm, so changed the code to walk the $PATH
looking for the necessary binaries.
****************************************
Index: Vanilla/rpm/cvs2rpm
diff -u Vanilla/rpm/cvs2rpm:1.1 Vanilla/rpm/cvs2rpm:1.2
--- Vanilla/rpm/cvs2rpm:1.1 Wed Jul 14 03:39:54 1999
+++ Vanilla/rpm/cvs2rpm Wed Jul 14 20:09:17 1999
@@ -5,7 +5,7 @@
#
# Make sure you check and set your VS and VL variable to get this to work.
#
-# $Id: cvs2rpm,v 1.1 1999/07/14 08:39:54 tanner Exp $
+# $Id: cvs2rpm,v 1.2 1999/07/15 01:09:17 tanner Exp $
#
# Change these if necessary!
@@ -15,20 +15,38 @@
RPM_SOURCE_DIR=/usr/src/redhat/SOURCES
RPM_SPEC_DIR=/usr/src/redhat/SPECS
-rpm -q cvs > /dev/null
-if [ $? -ne 0 ]; then
- echo "Error. Gotta have cvs installed. Aborting."
+
+IFS=:
+
+for bin in $PATH; do
+ if [ -x $bin/cvs ]; then
+ cvs=$bin/cvs
+ fi
+done
+
+if [ -z $cvs ]; then
+ echo "Error. Cannot find cvs, is it in your path? Aborting."
exit 1
fi
-rpm -q tar > /dev/null
-if [ $? -ne 0 ]; then
- echo "Error. Gotta have tar installed. Aborting."
+for bin in $PATH; do
+ if [ -x $bin/tar ]; then
+ tar=$bin/tar
+ fi
+done
+
+if [ -z $tar ]; then
+ echo "Error. Gotta find tar, is it in your path? Aborting."
exit 1
fi
-rpm -q bzip2 > /dev/null
-if [ $? -ne 0 ]; then
+for bin in $PATH; do
+ if [ -x $bin/bzip2 ]; then
+ bzip2=$bin/bzip2
+ fi
+done
+
+if [ -z $bzip2 ]; then
echo "Error. Gotta have bzip2 installed. Aborting."
exit 1
fi
@@ -37,19 +55,19 @@
# Create a distribtions, tar and gzip2 it
echo "Creating distribution. This could take a couple of minutes."
-cvs -z9 export -d Vanilla-$VS -r $VL Vanilla > /dev/null
+$cvs -z9 export -d Vanilla-$VS -r $VL Vanilla > /dev/null
if [ $? -ne 0 ]; then
echo "Error. CVS export failed. Aborting."
exit 1
fi
-tar -cf Vanilla-$VS.tar Vanilla-$VS > /dev/null
+$tar -cf Vanilla-$VS.tar Vanilla-$VS > /dev/null
if [ $? -ne 0 ]; then
echo "Error. tar failed. Aborting."
exit 1
fi
-bzip2 -9v Vanilla-$VS.tar > /dev/null
+$bzip2 -9v Vanilla-$VS.tar > /dev/null
if [ $? -ne 0 ]; then
echo "Error. bzip2 failed. Aborting."
exit 1