summaryrefslogtreecommitdiffstats
path: root/qt3-tqt3/rename_other_files
blob: 0e89403ddf1efc3968e7b6b6dc268426042fa5aa (plain)
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
32
33
34
35
36
#!/bin/bash
#
# (c) 2013 Timothy Pearson
# All Rights Reserved
#
# Use like this:
# find ./ -type d -exec /rename_other_files {} \;

cd $1

BASEDIR=${PWD##*/}

if [[ "$BASEDIR" == ".git" ]]; then
        echo "Ignoring .git directory"
        exit 0
fi

ls -d * | sed 's/\(.*\)qm2ts\(.*\)$/git mv "&" "\1tqm2ts\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)mergetr\(.*\)$/git mv "&" "\1tqtmergetr\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)msg2qm\(.*\)$/git mv "&" "\1msg2tqm\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)makeqpf\(.*\)$/git mv "&" "\1maketqpf\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)qvfb\(.*\)$/git mv "&" "\1tqvfb\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)createcw\(.*\)$/git mv "&" "\1tqtcreatecw\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)conv2ui\(.*\)$/git mv "&" "\1tqtconv2ui\2"/' | grep mv | sh

ls -d * | sed 's/\(.*\)findtr\(.*\)$/git mv "&" "\1tqtfindtr\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)qtrename140\(.*\)$/git mv "&" "\1tqtrename140\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)qt20fix\(.*\)$/git mv "&" "\1tqt20fix\2"/' | grep mv | sh

# Clean up unintended renames
ls -d * | sed 's/\(.*\)ttqvfb\(.*\)$/git mv "&" "\1tqvfb\2"/' | grep mv | sh

# Rename little-used libraries
ls -d * | sed 's/\(.*\)libeditor\(.*\)$/git mv "&" "\1libtqteditor\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)libdesignercore\(.*\)$/git mv "&" "\1libtqtdesignercore\2"/' | grep mv | sh
ls -d * | sed 's/\(.*\)libqassistantclient\(.*\)$/git mv "&" "\1libtqassistantclient\2"/' | grep mv | sh