File: move-alts

package info (click to toggle)
request-tracker3.6 3.6.1-4+etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 9,028 kB
  • ctags: 1,371
  • sloc: perl: 27,270; sh: 671; makefile: 327
file content (15 lines) | stat: -rw-r--r-- 239 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /usr/bin/perl

use strict;
use warnings;

my $ver=shift;

while (<>) {
	chomp;
	(my $src=$_) =~ s/!//;
	my $dst=$_;
	unless ($dst =~ /!/) {$dst .= '!'};
	$dst =~ s/!/-$ver/;
	rename $src,$dst or print "rename $src,$dst failed: $!\n";
}