From f0790abc938501893be9b6fdaf49d7009ac9c11f Mon Sep 17 00:00:00 2001 From: llornkcor Date: Fri, 12 Aug 2005 01:43:02 +0000 Subject: fix with import from kdescripts --- (limited to 'scripts') diff --git a/scripts/cvsrevertlast b/scripts/cvsrevertlast index cfbfd56..d019c44 100644 --- a/scripts/cvsrevertlast +++ b/scripts/cvsrevertlast @@ -4,15 +4,21 @@ # This script reverts all the files given on the command # by one version, then you can commit them. This # is like a less polite version of cvsblame ;) +##!/bin/sh +# (C) 2001 Charles Samuels +# +# This script reverts all the files given on the command +# by one version, then you can commit them. This +# is like a less polite version of cvsblame ;) # for i in $@ ; do - - text=`cvs log "$i" | grep 'revision[^s]'` - current=`echo $text | awk '{print $2}'` - previous=`echo $text | awk '{print $4}'` - echo $i... "(reverting from $current to $previous)" - cvs up -j $current -j $previous $i +text=`cvs status "$i" | grep '[^s]Repository revision:.*$'` +current=`echo $text | awk '{print $3}'` +previous=`echo $current | awk -F . '{ ORS="."; OFS="\n"; for (i=1; i