summaryrefslogtreecommitdiff
path: root/tools/upgrade-v8
blob: 36d0bf8c211832b56ac42dc77738a41419765a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

mv v7 v7.bak

echo ---------------- Saving v7 files into directory v7 ------------------
vfiles=`find . -name \*.v`
for i in $vfiles; do
  if expr $i : 'v7\.bak/.*\.v' > /dev/null ; then continue ; fi
  if expr $i : 'v7/.*\.v' > /dev/null ; then continue ; fi
  echo Saving $i into v7/$i
  j=v7/$i
  mkdir -p `dirname $j`
  mv -u -f $i $j
done

echo ---------------- Upgrading files with v8 syntax ---------------------
v8files=`find . -name \*.v8`
for i in $v8files; do
  j=`dirname $i`/`basename $i .v8`.v
  echo Upgrading $i
  mv -u -f $i $j
done