blob: f92f9fb640f19a8c742c62c48435d57026ce8636 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
#!/bin/bash
# Due to the ongoing API renaming in master, backporting commits from master
# to r14.1.x could potentially lead to conflicts, and the probability of that
# happening will keep increasing over time.
# This script is intented to reduce/eliminate those conflicts by undoing the
# API changes done in master.
#
if [ -z "$1" ]; then
cat <<USAGE
Preparing patches for backporting from master to r14.1.x branch.
Usage:
1. save the changes of the commit to backport to a file
git format-patch -1 <commit hash> -o <output_folder>
2. run this script on the saved file
$(basename "$0") <output_folder>/<patch_filename> [...]
3. apply changes to r14.1.x branch
git am <output_folder>/<patch_filename>
4. edit commit message to add cherry pick note under signed off clause
git commit --amend --no-edit -S
and add:
(cherry picked from <commit hash>)
USAGE
exit 1
fi
# TDEUniqueApplication --> KUniqueApplication
sed -i "$@" \
-e "s|TDEUniqueApplication|KUniqueApplication|g" \
-e "s|\btdeuniqueapp|kuniqueapp|g" \
-e "s|\btdeunique_|kunique_|g" \
-e "s|TDEUNIQUEAPP|KUNIQUEAPP|g" \
# TDEAppDCOPInterface --> KAppDCOPInterface
sed -i "$@" \
-e "s|TDEAppDCOPInterface|KAppDCOPInterface|g" \
-e "s|tdeappdcopinterface|kappdcopiface|g" \
-e "s|tdeappdcopiface|kappdcopiface|g" \
-e "s|m_TDEAppDCOPInterface|m_KAppDCOPInterface|g" \
-e "s|TDEAPPDCOP_INTERFACE_H|KAPPDCOP_INTERFACE_H|g" \
# tdeprocctrl --> kprocctrl
# tdeprocess --> kprocess
# TDEProcIO --> KProcIO
sed -i "$@" \
-e "s|tdeprocctrl|kprocctrl|g" \
-e "s|tdeprocess|kprocess|g" \
-e "s|TDEProcIO|KProcIO|g" \
-e "s|tdeprocio|kprocio|g" \
# tdecrash --> kcrash
sed -i "$@" \
-e "s|tdecrash|kcrash|g" \
# tdeapp --> kapp
sed -i "$@" \
-e "s|\btdeApplication\b|kApplication|g" "$1" \
-e "s|\btdeApp\b|kapp|g" "$1" \
-e "s|\bTDEApp\b|KApp|g" "$1" \
-e "s|\bnoTDEApp\b|noKApp|g" "$1" \
# tdeglobalaccel.h --> kglobalaccel.h
sed -i "$@" \
-e "s|\btdeglobalaccel\.h\b|kglobalaccel.h|g" "$1" \
# tdestandarddirs.h --> kstandarddirs.h
sed -i "$@" \
-e "s|\btdestandarddirs\.h\b|kstandarddirs.h|g" "$1" \
# tdesimpleconfig --> ksimpleconfig
# TDESimpleConfig --> KSimpleConfig
sed -i "$@" \
-e "s|tdesimpleconfig|ksimpleconfig|g" "$1" \
-e "s|TDESimpleConfig|KSimpleConfig|g" "$1" \
# tdedesktopfile --> kdesktopfile
# TDEDesktopFile --> KDesktopFile
sed -i "$@" \
-e "s|tdedesktopfile|kdesktopfile|g" "$1" \
-e "s|TDEDesktopFile|KDesktopFile|g" "$1" \
# coreThread --> guiThread
sed -i "$@" \
-e "s|\bcoreThread\b|guiThread|g" "$1" \
-e "s|\bcoreThreadAwake\b|guiThreadAwake|g" "$1" \
-e "s|\bfinishCoreThread\b|finishGuiThread|g" "$1" \
-e "s|\bisCoreThread\b|isGuiThread|g" "$1" \
-e "s|\bwakeUpCoreThread\b|wakeUpGuiThread|g" "$1" \
|