5 |
# Copyright (C) 2004-2005 Red Hat, Inc. |
# Copyright (C) 2004-2005 Red Hat, Inc. |
6 |
# Copyright (C) 2005 Fedora Foundation |
# Copyright (C) 2005 Fedora Foundation |
7 |
# |
# |
8 |
# $Id: cvs-import.sh,v 1.1 2007/11/08 18:10:19 slords Exp $ |
# $Id: cvs-import.sh,v 1.3 2007/12/25 05:12:58 slords Exp $ |
9 |
|
|
10 |
# Initial setup |
# Initial setup |
11 |
CVSTREE=${CVSTREE:=extras} |
CVSTREE=${CVSTREE:=extras} |
142 |
SPECFILE = \$(firstword \$(wildcard *.spec)) |
SPECFILE = \$(firstword \$(wildcard *.spec)) |
143 |
|
|
144 |
define find-makefile-common |
define find-makefile-common |
145 |
for d in ../common ../../common ; do if [ -f \$\$d/Makefile.common ] ; then if [ -f \$\$d/CVS/Root -a -w \$\$/Makefile.common ] ; then cd \$\$d ; cvs -Q update ; fi ; echo "\$\$d/Makefile.common" ; break ; fi ; done |
for d in common ../common ../../common ; do if [ -f \$\$d/Makefile.common ] ; then if [ -f \$\$d/CVS/Root -a -w \$\$/Makefile.common ] ; then cd \$\$d ; cvs -Q update ; fi ; echo "\$\$d/Makefile.common" ; break ; fi ; done |
146 |
endef |
endef |
147 |
|
|
148 |
MAKEFILE_COMMON := \$(shell \$(find-makefile-common)) |
MAKEFILE_COMMON := \$(shell \$(find-makefile-common)) |
150 |
ifeq (\$(MAKEFILE_COMMON),) |
ifeq (\$(MAKEFILE_COMMON),) |
151 |
# attept a checkout |
# attept a checkout |
152 |
define checkout-makefile-common |
define checkout-makefile-common |
153 |
test -f CVS/Root && { cd .. ; cvs -Q -d \$\$(cat CVS/Root) checkout common && echo "../common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 |
test -f CVS/Root && { cvs -Q -d \$\$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 |
154 |
endef |
endef |
155 |
|
|
156 |
MAKEFILE_COMMON := \$(shell \$(checkout-makefile-common)) |
MAKEFILE_COMMON := \$(shell \$(checkout-makefile-common)) |
290 |
echo "Please check the above cvs diff." |
echo "Please check the above cvs diff." |
291 |
echo "If you want to make any changes before committing, please press Ctrl-C." |
echo "If you want to make any changes before committing, please press Ctrl-C." |
292 |
echo "Otherwise press Enter to proceed to commit." |
echo "Otherwise press Enter to proceed to commit." |
293 |
#read |
read |
294 |
|
|
295 |
cvs -Q update && \ |
cvs -Q update && \ |
296 |
echo "cvs commit..." && \ |
echo "cvs commit..." && \ |