File: move-alts

package info (click to toggle)
request-tracker5 5.0.7%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 80,264 kB
  • sloc: javascript: 191,898; perl: 87,146; sh: 1,426; makefile: 487; python: 37; php: 15
file content (15 lines) | stat: -rw-r--r-- 239 bytes parent folder | download | duplicates (23)
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";
}