diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-09-04 14:37:50 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-09-04 14:37:50 +0000 |
commit | a084c7724cc20c4136562a82b3864f06a25adbdf (patch) | |
tree | dfc272f61af00be8feb3a1265e41db608d4e6000 /encap | |
parent | 4aa9a4856becd2d50fc6f99a8fc523b7a6c2d2f6 (diff) | |
download | bcfg2-a084c7724cc20c4136562a82b3864f06a25adbdf.tar.gz bcfg2-a084c7724cc20c4136562a82b3864f06a25adbdf.tar.bz2 bcfg2-a084c7724cc20c4136562a82b3864f06a25adbdf.zip |
EncapPackages: Fixed bcfg2bump
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2181 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap')
-rw-r--r-- | encap/src/encap-profiles/Makefile | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/encap/src/encap-profiles/Makefile b/encap/src/encap-profiles/Makefile index 664aea619..f41834f8c 100644 --- a/encap/src/encap-profiles/Makefile +++ b/encap/src/encap-profiles/Makefile @@ -11,6 +11,7 @@ export MKENCAP := ${BASEDIR}/bin/mkencap export SHELL = /bin/sh srcdir = . export EP2TARGET := $(srcdir)/ep2target +PAGER ?= more BCFG2 := $(basename $(wildcard bcfg2-[0-9].[0-9]*.ep)) BCFG2_CHEETAH := $(basename $(wildcard bcfg2-cheetah-[0-9].[0-9]*.ep)) @@ -170,30 +171,37 @@ bcfg2only : $(MAKE) -t; sleep 2; touch $(srcdir)/$(BCFG2).ep; $(MAKE) bcfg2bump : - @if [ "$(NEWVERSION)x" != "x" ]; then NEWVERSION="$(NEWVERSION)"; fi && \ + @if [ "$(NEW)x" != "x" ]; then NEW="$(NEW)"; fi && \ + if [ "$(OLD)x" != "x" ]; then OLD="$(OLD)"; fi && \ if [ "$(FORCE)x" != "x" ]; then FORCE="$(FORCE)"; fi && \ - if [ "$${NEWVERSION}x" != "x" ]; then \ + if [ "$${OLD}x" != "x" -a "$${NEW}x" != "x" ]; then \ + OLDBASE="`printf "%s\n" "$${OLD}" | sed 's:\.ep::g'`"; \ + NEWBASE="`printf "%s\n" "$${NEW}" | sed 's:\.ep::g'`"; \ if [ "$${FORCE}x" != "yesmamx" ]; then \ - printf "About to 'svn mv %s %s'\n" "$(BCFG2).ep" "$$NEWVERSION"; \ + printf "About to 'svn mv %s %s'\n" "$$OLD" "$$NEW"; \ printf "\tand edit the later as appropriate.\n"; \ + printf "And then 'rm %s%s'...\n" "$$OLDBASE" ".*"; \ printf "Press 'return' to continue, or 'ctrl-c' to exit. "; \ read THROWAWAY; \ fi; \ - svn mv $(BCFG2).ep $${NEWVERSION}; \ - NVBASE="`printf "%s\n" "$${NEWVERSION}" | sed 's:\.ep::g'`"; \ - sed s:$(BCFG2):$$NVBASE:g $${NEWVERSION} > $${NEWVERSION}.tmp; \ - mv $${NEWVERSION}.tmp $${NEWVERSION}; \ - printf "Changes to %s are:\n" "$${NEWVERSION}"; \ - svn diff $${NEWVERSION}; \ + svn mv $${OLD} $${NEW} && \ + sed s:$${OLDBASE}:$${NEWBASE}:g $${NEW} > $${NEW}.tmp && \ + mv $${NEW}.tmp $${NEW} && \ + rm $${OLDBASE}.*; \ + printf "Changes to %s are:\n" "$${NEW}"; \ if [ "$${FORCE}x" != "yesmamx" ]; then \ - printf "'svn commit %s -m \"EncapPackages: Bumped bcfg2 .ep version to %s\"'? \n" "$${NEWVERSION}" "$${NEWVERSION}"; \ + svn diff $${NEW} | $(PAGER); \ + printf "'svn commit %s %s -m \"EncapPackages: Bumped bcfg2 .ep version to %s\"'? \n" "$${OLD}" "$${NEW}" "$${NEW}"; \ printf "Press 'return' to commit, or 'ctrl-c' to exit. "; \ read THROWAWAY; \ + else \ + svn diff $${NEW}; \ fi; \ - svn commit $${NEWVERSION} -m "EncapPackages: Bumped bcfg2 .ep version to $${NVBASE}"; \ + svn commit $${OLD} $${NEW} -m "EncapPackages: Bumped bcfg2 .ep version to $${NEW}"; \ else \ - printf "Set the NEWVERSION (and optionally FORCE) environment variables\n"; \ - printf "Example: 'NEWVERSION=bcfg2-0.8.3.ep $(MAKE) bcfg2bump'\n"; \ + printf "Set the OLD, NEW (and optionally FORCE) environment "; \ + printf "variables. Example:\n"; \ + printf "\tOLD=bcfg2-0.8.3pre5.ep NEW=bcfg2-0.8.3.ep $(MAKE) bcfg2bump\n";\ fi include $(addsuffix .d,$(sources)) |