File: rename-pkgs.sh

package info (click to toggle)
gcc-3.3 1%3A3.3.6ds1-28
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 25,812 kB
  • ctags: 262
  • sloc: sh: 10,321; makefile: 1,050; perl: 155; awk: 23; cpp: 14
file content (31 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/bash

rename_pkg()
{
  src=$1
  dest=$2
  for ext in preinst postinst prerm postrm doc-base; do
    if [ -f $src.$ext ]; then
      if [ -f $dest.ext ]; then
	echo already exists: $dest.$ext
      else
	echo "$src.$ext --> $dest.$ext"
	mv $src.$ext $dest.$ext
      fi
    fi
  done
}

v_new=3.3
v_old=3.2

for p in chill cpp gcc g++ g77 gpc gij gcj gobjc protoize; do
  rename_pkg $p-$v_old $p-$v_new
done

for p in cpp gcc g77 gnat; do
  rename_pkg $p-$v_old-doc $p-$v_new-doc
done

rename_pkg gcc-$v_old-base gcc-$v_new-base
rename_pkg gcc-$v_old-sparc64 gcc-$v_new-sparc64