Compare commits

..

6 Commits

Author SHA1 Message Date
Slávek Banko 8eb2ea0f54 switch_all_submodules_to_head_and_clean: Add support to clone from mirror
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 980d8ea3f8)
10 years ago
Slávek Banko 6d53459401 switch_all_submodules_to_head_and_clean: Use --rebase on git pull
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 916d3c9355)
10 years ago
Slávek Banko 5097cbe74c Update version number for new target R14.0.3 10 years ago
Slávek Banko 4b764e3a1f Update version number for new target R14.0.2 10 years ago
Slávek Banko 41bd09eab9 Update default target release to R14.0.1
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
11 years ago
Slávek Banko 580cb8e6f8 create_tarball: Split initial character in tag while sorting by version
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 0a16bdf260)
11 years ago

@ -0,0 +1,29 @@
#!/bin/bash
if [[ $1 == "" ]]; then
echo "Please specify the source directory to beautify"
exit 1
fi
ASTYLEARGS=$( cat <<EOF
--indent=tab \
--indent-classes \
--indent-switches \
--indent-cases \
--indent-namespaces \
--indent-labels \
--indent-col1-comments \
\
--unpad-paren \
\
--style=java \
--add-brackets \
--break-closing-brackets \
--keep-one-line-statements
EOF
)
astyle $ASTYLEARGS --recursive $1/*.c || true
astyle $ASTYLEARGS --recursive $1/*.cc || true
astyle $ASTYLEARGS --recursive $1/*.cpp || true
astyle $ASTYLEARGS --recursive $1/*.h || true

@ -0,0 +1,14 @@
--indent=tab
--indent-classes
--indent-switches
--indent-cases
--indent-namespaces
--indent-labels
--indent-col1-comments
--unpad-paren
--style=java
--add-brackets
--break-closing-brackets
--keep-one-line-statements

@ -1,563 +0,0 @@
#!/bin/bash
#
# Licensed under the GPL v2
THISSCRIPT=$(readlink -f $0)
if [[ ! -e "$THISSCRIPT" ]]; then
echo "Unable to find myself! Exiting..."
exit 1
fi
SCRIPTPATH=`dirname $THISSCRIPT`
find ./ -type f -not -iwholename '*.git*' -print0 |
xargs -r0 grep -ElI "([^a-zA-Z0-9]|^)(\
(|-l|lib)kdecorations|\
(|-l|lib)kdecore|\
(|-l|lib)kdefakes|\
(|-l|lib)kdefx|\
(|-l|lib)kdegames|\
(|-l|lib)kdeinit|\
(|-l|lib)kdepim|\
(|-l|lib)kdeprint|\
(|-l|lib)kdesasl|\
(|-l|lib)kdesu|\
(|-l|lib)kdesvnpart|\
(|-l|lib)kdeui|\
KDECORATIONS|\
KDECORE|\
KDEFAKES|\
KDEFX|\
KDEGAMES|\
KDEINIT|\
KDEPIM|\
KDEPRINT|\
KDESASL|\
KDESU|\
KDESVNPART|\
KDEUI|\
KDNSSD|\
KIMPROXY|\
KIO([^a-zA-Z0-9]|\$)|\
KPARTS|\
KSPELL|\
KSYCOCA|\
KUNITTEST|\
KUTILS|\
(|-l|lib)kdeaccessibility|\
(|-l|lib)kdeaddons|\
(|-l|lib)kdeadmin|\
(|-l|lib)kdeartwork|\
(|-l|lib)kdebase|\
(|-l|lib)kdebindings|\
(|-l|lib)kdeedu|\
(|-l|lib)kdegames|\
(|-l|lib)kdegraphics|\
kde-i18n|\
(|-l|lib)kdelibs|\
(|-l|lib)kdemultimedia|\
(|-l|lib)kdenetwork|\
(|-l|lib)kdepim|\
(|-l|lib)kdesdk|\
(|-l|lib)kdetoys|\
(|-l|lib)kdeutils|\
(|-l|lib)kdevelop|\
(|-l|lib)kdewebdev|\
desktop-effects-kde|\
kde-guidance|\
kde-style-lipstik|\
kde-style-qtcurve|\
kdesudo|\
kdesvn|\
kde-systemsettings|\
kwin-style-crystal|\
kwin|\
KDE_VERSION|\
kdeversion|\
startkde|\
pykde|\
KDEHOME|\
KDEDIR|\
KDE_MULTIHEAD|\
KDE_SESSION|\
kdehome|\
kdedir|\
KDEROOTHOME|\
kderoothome|\
KDE_MAKE_VERSION|\
kdm|\
KDM|\
ksocket|\
KSOCKET|\
kcache|\
KCACHE|\
KDETMP|\
KDEVARTMP|\
KDEWM|\
include/kde([^\.]|\$)|\
\$\{INCLUDE_INSTALL_DIR\}/kde([^\.]|\$)|\
kde-config|\
KDE_FORK_SLAVES|\
KDE_HOME_READONLY|\
KDE_NO_IPV6|\
KDE_IS_PRELINKED|\
KDE_UTF8_FILENAMES|\
KDESYCOCA|\
KApplication|\
KAppDCOPInterface|\
noKApp|\
KApp|\
kapp|\
TDEApplication::kApplication()|\
KUniqueApplication|\
KCmdLineArgs|\
KInstance|\
KAboutData|\
KCModule|\
KConfig|\
KSimpleConfig|\
ksimpleconfig|\
KDesktopFile|\
kdesktopfile|\
KServer|\
KSocket|\
KIO\.|\
KIO:|\
KIO;|\
\<KIO\>|\
KIO_|\
KIOInput|\
KIOJob|\
KIOConfig|\
KIOBuffer|\
KBuffer|\
kcmodule|\
kconfig_compiler|\
kunittestmodrunner|\
kioexec|\
kio_|\
kmailservice|\
ktelnetservice|\
ksendbugmail|\
(|-l|lib)kfile|\
ktradertest|\
kbuildsycoca|\
kde-menu|\
kmimelist|\
kioslave|\
kio/|\
(|-l|lib)kio\>|\
kstartupconfig|\
kdostartupconfig|\
klauncher|\
kab2kabc|\
kcmshell|\
kconf|\
khotnewstuff|\
(|-l|lib)ksycoca|\
(|-l|lib)kunittest|\
(|-l|lib)kwallet|\
kntlm|\
(|-l|lib)kparts|\
(|-l|lib)kutils|\
(|-l|lib)kspell|\
(|-l|lib)kmdi|\
(|-l|lib)kresources|\
kscript|\
kmediaplayer|\
(|-l|lib)kimproxy|\
(|-l|lib)ktexteditor|\
kcert|\
krandr|\
(|-l|lib)khtml|\
kmulti|\
kmid|\
kscreensaver|\
(|-l|lib)kdnssd|\
krsync|\
kiobuffer|\
KHTML|\
KShared|\
KStandard|\
KStartup|\
KLocale|\
KLock|\
KTrader|\
KLaunch|\
KShort|\
KStdAccel|\
KAccel|\
KAction|\
KMain|\
KTool|\
KPopup|\
KToggle|\
KRadio|\
KSelect|\
KList|\
KRecent|\
KFont|\
KPaste|\
klaunch|\
kshort|\
kstdaccel|\
kaccel|\
kaction|\
kcrash|\
kmain|\
ktool|\
kpopup|\
ktoggle|\
kradio|\
kselect|\
klist|\
krecent|\
kfont|\
kpaste|\
kdisplay|\
KStyle|\
KIcon|\
KZone|\
KCrash|\
KCmd|\
KAbout|\
KComp|\
KGlobal|\
(|the)KProcess|\
kprocess|\
kprocctrl|\
KProcIO|\
kprocio|\
KClipboard|\
Kwallet|\
KWallet|\
KWALLET|\
kcompletionbox|\
kaboutapplication\.|\
kaboutdata\.|\
kaboutdialog\.|\
kaboutkde\.|\
kcmdlineargs\.|\
kapplication\.|\
kuniqueapplication\.|\
kstyle\.|\
drawKStylePrimitive|\
kdiroperator\.|\
klocale\.|\
kmessagebox\.|\
ktempfile\.|\
kemailsettings\.|\
kglobal\.|\
kglobalaccel\.|\
kglobalsettings\.|\
kmenubar\.|\
kprotocolmanager\.|\
kstartupinfo\.|\
kabc|\
(|-l|lib)kabc|\
makekdewidgets|\
MAKEKDEWIDGETS|\
kdewidgets|\
Categories=Qt;KDE|\
X-KDE-|\
kde\.org/tdehotnewstuff|\
tdevelop[a-z_\-]*@[tk]develop\.org|\
tdevelop\.org|\
tdewebdev\.org|\
\<tdelistr|\
kde toolbar widget\
kstandarddirs\.|\
kinstance\.h|\
)" |
tr "\n" "\0" |
xargs -r0 sed -ri \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdecorations|\1tdecorations|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdecore|\1tdecore|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdefakes|\1tdefakes|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdefx|\1tdefx|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdegames|\1tdegames|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeinit|\1tdeinit|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdepim|\1tdepim|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeprint|\1tdeprint|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesasl|\1tdesasl|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesu|\1tdesu|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesvnpart|\1tdesvnpart|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeui|\1tdeui|g" \
-e "s|([^a-zA-Z0-9]\|^)KDECORATIONS|\1TDECORATIONS|g" \
-e "s|([^a-zA-Z0-9]\|^)KDECORE|\1TDECORE|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEFAKES|\1TDEFAKES|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEFX|\1TDEFX|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEGAMES|\1TDEGAMES|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEINIT|\1TDEINIT|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEPIM|\1TDEPIM|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEPRINT|\1TDEPRINT|g" \
-e "s|([^a-zA-Z0-9]\|^)KDESASL|\1TDESASL|g" \
-e "s|([^a-zA-Z0-9]\|^)KDESU|\1TDESU|g" \
-e "s|([^a-zA-Z0-9]\|^)KDESVNPART|\1TDESVNPART|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEUI|\1TDEUI|g" \
-e "s|([^a-zA-Z0-9]\|^)KDNSSD|\1TDEDNSSD|g" \
-e "s|([^a-zA-Z0-9]\|^)KIMPROXY|\1TDEIMPROXY|g" \
-e "s|([^a-zA-Z0-9]\|^)KIO([^a-zA-Z0-9]\|\$)|\1TDEIO\2|g" \
-e "s|([^a-zA-Z0-9]\|^)KPARTS|\1TDEPARTS|g" \
-e "s|([^a-zA-Z0-9]\|^)KSPELL|\1TDESPELL|g" \
-e "s|([^a-zA-Z0-9]\|^)KSYCOCA|\1TDESYCOCA|g" \
-e "s|([^a-zA-Z0-9]\|^)KUNITTEST|\1TDEUNITTEST|g" \
-e "s|([^a-zA-Z0-9]\|^)KUTILS|\1TDEUTILS|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeaccessibility|\1tdeaccessibility|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeaddons|\1tdeaddons|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeadmin|\1tdeadmin|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeartwork|\1tdeartwork|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdebase|\1tdebase|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdebindings|\1tdebindings|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeedu|\1tdeedu|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdegames|\1tdegames|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdegraphics|\1tdegraphics|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-i18n|\1tde-i18n|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdelibs|\1tdelibs|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdemultimedia|\1tdemultimedia|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdenetwork|\1tdenetwork|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdepim|\1tdepim|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesdk|\1tdesdk|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdetoys|\1tdetoys|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeutils|\1tdeutils|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdevelop|\1tdevelop|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdewebdev|\1tdewebdev|g" \
-e "s|([^a-zA-Z0-9]\|^)desktop-effects-kde|\1desktop-effects-tde|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-guidance|\1tde-guidance|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-style-lipstik|\1tde-style-lipstik|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-style-qtcurve|\1tde-style-qtcurve|g" \
-e "s|([^a-zA-Z0-9]\|^)kdesudo|\1tdesudo|g" \
-e "s|([^a-zA-Z0-9]\|^)kdesvn|\1tdesvn|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-systemsettings|\1tde-systemsettings|g" \
-e "s|([^a-zA-Z0-9]\|^)kwin-style-crystal|\1twin-style-crystal|g" \
-e "s|([^a-zA-Z0-9]\|^)kwin|\1twin|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_VERSION|\1TDE_VERSION|g" \
-e "s|([^a-zA-Z0-9]\|^)kdeversion|\1tdeversion|g" \
-e "s|([^a-zA-Z0-9]\|^)startkde|\1starttde|g" \
-e "s|([^a-zA-Z0-9]\|^)pykde|\1pytde|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEHOME|\1TDEHOME|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEDIR|\1TDEDIR|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_MULTIHEAD|\1TDE_MULTIHEAD|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_SESSION|\1TDE_SESSION|g" \
-e "s|([^a-zA-Z0-9]\|^)kdehome|\1tdehome|g" \
-e "s|([^a-zA-Z0-9]\|^)kdedir|\1tdedir|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEROOTHOME|\1TDEROOTHOME|g" \
-e "s|([^a-zA-Z0-9]\|^)kderoothome|\1tderoothome|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_MAKE_VERSION|\1TDE_MAKE_VERSION|g" \
-e "s|([^a-zA-Z0-9]\|^)kdm|\1tdm|g" \
-e "s|([^a-zA-Z0-9]\|^)KDM|\1TDM|g" \
-e "s|([^a-zA-Z0-9]\|^)ksocket|\1tdesocket|g" \
-e "s|([^a-zA-Z0-9]\|^)KSOCKET|\1TDESOCKET|g" \
-e "s|([^a-zA-Z0-9]\|^)kcache|\1tdecache|g" \
-e "s|([^a-zA-Z0-9]\|^)KCACHE|\1TDECACHE|g" \
-e "s|([^a-zA-Z0-9]\|^)KDETMP|\1TDETMP|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEVARTMP|\1TDEVARTMP|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEWM|\1TDEWM|g" \
-e "s|([^a-zA-Z0-9]\|^)include/kde([^\.]\|\$)|\1include/tde\2|g" \
-e "s|([^a-zA-Z0-9]\|^)\$\{INCLUDE_INSTALL_DIR\}/kde([^\.]\|\$)|\1\${INCLUDE_INSTALL_DIR}/tde\2|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-config|\1tde-config|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_FORK_SLAVES|\1TDE_FORK_SLAVES|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_HOME_READONLY|\1TDE_HOME_READONLY|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_NO_IPV6|\1TDE_NO_IPV6|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_IS_PRELINKED|\1TDE_IS_PRELINKED|g" \
-e "s|([^a-zA-Z0-9]\|^)KDE_UTF8_FILENAMES|\1TDE_UTF8_FILENAMES|g" \
-e "s|([^a-zA-Z0-9]\|^)KDESYCOCA|\1TDESYCOCA|g" \
\
-e "s|([^a-zA-Z0-9]\|^)TDEApplication::kApplication()|\1tdeApp|g" \
-e "s|([^a-zA-Z0-9]\|^)KApplication|\1TDEApplication|g" \
-e "s|([^a-zA-Z0-9]\|^)kApplication|\1tdeApplication|g" \
-e "s|([^a-zA-Z0-9]\|^)KUniqueApplication|\1TDEUniqueApplication|g" \
-e "s|([^a-zA-Z0-9]\|^)KAppDCOPInterface|\1TDEAppDCOPInterface|g" \
-e "s|([^a-zA-Z0-9]\|^)KCmdLineArgs|\1TDECmdLineArgs|g" \
-e "s|([^a-zA-Z0-9]\|^)KInstance|\1TDEInstance|g" \
-e "s|([^a-zA-Z0-9]\|^)KAboutData|\1TDEAboutData|g" \
-e "s|([^a-zA-Z0-9]\|^)noKApp|\1noTDEApp|g" \
-e "s|([^a-zA-Z0-9]\|^)KApp|\1TDEApp|g" \
-e "s|([^a-zA-Z0-9]\|^)kapp|\1tdeApp|g" \
\
-e "s|([^a-zA-Z0-9]\|^)KCModule|\1TDECModule|g" \
-e "s|([^a-zA-Z0-9]\|^)KConfig|\1TDEConfig|g" \
-e "s|([^a-zA-Z0-9]\|^)KSimpleConfig|\1TDESimpleConfig|g" \
-e "s|([^a-zA-Z0-9]\|^)ksimpleconfig|\1tdesimpleconfig|g" \
-e "s|([^a-zA-Z0-9]\|^)KDesktopFile|\1TDEDesktopFile|g" \
-e "s|([^a-zA-Z0-9]\|^)kdesktopfile|\1tdedesktopfile|g" \
-e "s|([^a-zA-Z0-9]\|^)KServer|\1TDEServer|g" \
-e "s|([^a-zA-Z0-9]\|^)KSocket|\1TDESocket|g" \
-e "s|([^a-zA-Z0-9]\|^)KIO\.|\1TDEIO.|g" \
-e "s|([^a-zA-Z0-9]\|^)KIO:|\1TDEIO:|g" \
-e "s|([^a-zA-Z0-9]\|^)KIO;|\1TDEIO;|g" \
-e "s|([^a-zA-Z0-9]\|^)\<KIO\>|\1TDEIO|g" \
-e "s|([^a-zA-Z0-9]\|^)KIO_|\1TDEIO_|g" \
-e "s|([^a-zA-Z0-9]\|^)KIOInput|\1TDEIOInput|g" \
-e "s|([^a-zA-Z0-9]\|^)KIOJob|\1TDEIOJob|g" \
-e "s|([^a-zA-Z0-9]\|^)KIOConfig|\1TDEIOConfig|g" \
-e "s|([^a-zA-Z0-9]\|^)KIOBuffer|\1TDEIOBuffer|g" \
-e "s|([^a-zA-Z0-9]\|^)KBuffer|\1TDEBuffer|g" \
-e "s|([^a-zA-Z0-9]\|^)kcmodule|\1tdecmodule|g" \
\
-e "s|([^a-zA-Z0-9]\|^)kconfig_compiler|\1tdeconfig_compiler|g" \
-e "s|([^a-zA-Z0-9]\|^)kunittestmodrunner|\1tdeunittestmodrunner|g" \
-e "s|([^a-zA-Z0-9]\|^)kioexec|\1tdeioexec|g" \
-e "s|([^a-zA-Z0-9]\|^)kio_|\1tdeio_|g" \
-e "s|([^a-zA-Z0-9]\|^)kmailservice|\1tdemailservice|g" \
-e "s|([^a-zA-Z0-9]\|^)ktelnetservice|\1tdetelnetservice|g" \
-e "s|([^a-zA-Z0-9]\|^)ksendbugmail|\1tdesendbugmail|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kfile|\1tdefile|g" \
-e "s|([^a-zA-Z0-9]\|^)ktradertest|\1tdetradertest|g" \
-e "s|([^a-zA-Z0-9]\|^)kbuildsycoca|\1tdebuildsycoca|g" \
-e "s|([^a-zA-Z0-9]\|^)kde-menu|\1tde-menu|g" \
-e "s|([^a-zA-Z0-9]\|^)kmimelist|\1tdemimelist|g" \
-e "s|([^a-zA-Z0-9]\|^)kioslave|\1tdeioslave|g" \
-e "s|([^a-zA-Z0-9]\|^)kio/|\1tdeio/|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kio\>|\1tdeio|g" \
-e "s|([^a-zA-Z0-9]\|^)kstartupconfig|\1tdestartupconfig|g" \
-e "s|([^a-zA-Z0-9]\|^)kdostartupconfig|\1tdedostartupconfig|g" \
-e "s|([^a-zA-Z0-9]\|^)klauncher|\1tdelauncher|g" \
-e "s|([^a-zA-Z0-9]\|^)kab2kabc|\1tdeab2tdeabc|g" \
-e "s|([^a-zA-Z0-9]\|^)kcmshell|\1tdecmshell|g" \
-e "s|([^a-zA-Z0-9]\|^)kconf|\1tdeconf|g" \
-e "s|([^a-zA-Z0-9]\|^)khotnewstuff|\1tdehotnewstuff|g" \
\
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)ksycoca|\1tdesycoca|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kunittest|\1tdeunittest|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kwallet|\1tdewallet|g" \
-e "s|([^a-zA-Z0-9]\|^)kntlm|\1tdentlm|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kparts|\1tdeparts|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kutils|\1tdeutils|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kspell|\1tdespell|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kmdi|\1tdemdi|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kresources|\1tderesources|g" \
-e "s|([^a-zA-Z0-9]\|^)kscript|\1tdescript|g" \
-e "s|([^a-zA-Z0-9]\|^)kmediaplayer|\1tdemediaplayer|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kimproxy|\1tdeimproxy|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)ktexteditor|\1tdetexteditor|g" \
-e "s|([^a-zA-Z0-9]\|^)kcert|\1tdecert|g" \
-e "s|([^a-zA-Z0-9]\|^)krandr|\1tderandr|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)khtml|\1tdehtml|g" \
-e "s|([^a-zA-Z0-9]\|^)kmulti|\1tdemulti|g" \
-e "s|([^a-zA-Z0-9]\|^)kmid|\1tdemid|g" \
-e "s|([^a-zA-Z0-9]\|^)kscreensaver|\1tdescreensaver|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdnssd|\1tdednssd|g" \
-e "s|([^a-zA-Z0-9]\|^)krsync|\1tdersync|g" \
\
-e "s|([^a-zA-Z0-9]\|^)kiobuffer|\1tdeiobuffer|g" \
-e "s|([^a-zA-Z0-9]\|^)KHTML|\1TDEHTML|g" \
-e "s|([^a-zA-Z0-9]\|^)KShared|\1TDEShared|g" \
-e "s|([^a-zA-Z0-9]\|^)KStandard|\1TDEStandard|g" \
-e "s|([^a-zA-Z0-9]\|^)KStartup|\1TDEStartup|g" \
-e "s|([^a-zA-Z0-9]\|^)KLocale|\1TDELocale|g" \
-e "s|([^a-zA-Z0-9]\|^)KLock|\1TDELock|g" \
-e "s|([^a-zA-Z0-9]\|^)KTrader|\1TDETrader|g" \
-e "s|([^a-zA-Z0-9]\|^)KLaunch|\1TDELaunch|g" \
-e "s|([^a-zA-Z0-9]\|^)KShort|\1TDEShort|g" \
-e "s|([^a-zA-Z0-9]\|^)KStdAccel|\1TDEStdAccel|g" \
-e "s|([^a-zA-Z0-9]\|^)KAccel|\1TDEAccel|g" \
-e "s|([^a-zA-Z0-9]\|^)KAction|\1TDEAction|g" \
-e "s|([^a-zA-Z0-9]\|^)KMain|\1TDEMain|g" \
-e "s|([^a-zA-Z0-9]\|^)KTool|\1TDETool|g" \
-e "s|([^a-zA-Z0-9]\|^)KPopup|\1TDEPopup|g" \
-e "s|([^a-zA-Z0-9]\|^)KToggle|\1TDEToggle|g" \
-e "s|([^a-zA-Z0-9]\|^)KRadio|\1TDERadio|g" \
-e "s|([^a-zA-Z0-9]\|^)KSelect|\1TDESelect|g" \
-e "s|([^a-zA-Z0-9]\|^)KList|\1TDEList|g" \
-e "s|([^a-zA-Z0-9]\|^)KRecent|\1TDERecent|g" \
-e "s|([^a-zA-Z0-9]\|^)KFont|\1TDEFont|g" \
-e "s|([^a-zA-Z0-9]\|^)KPaste|\1TDEPaste|g" \
-e "s|([^a-zA-Z0-9]\|^)klaunch|\1tdelaunch|g" \
-e "s|([^a-zA-Z0-9]\|^)kshort|\1tdeshort|g" \
-e "s|([^a-zA-Z0-9]\|^)kstdaccel|\1tdestdaccel|g" \
-e "s|([^a-zA-Z0-9]\|^)kaccel|\1tdeaccel|g" \
-e "s|([^a-zA-Z0-9]\|^)kaction|\1tdeaction|g" \
-e "s|([^a-zA-Z0-9]\|^)kcrash|\1tdecrash|g" \
-e "s|([^a-zA-Z0-9]\|^)kmain|\1tdemain|g" \
-e "s|([^a-zA-Z0-9]\|^)ktool|\1tdetool|g" \
-e "s|([^a-zA-Z0-9]\|^)kpopup|\1tdepopup|g" \
-e "s|([^a-zA-Z0-9]\|^)ktoggle|\1tdetoggle|g" \
-e "s|([^a-zA-Z0-9]\|^)kradio|\1tderadio|g" \
-e "s|([^a-zA-Z0-9]\|^)kselect|\1tdeselect|g" \
-e "s|([^a-zA-Z0-9]\|^)klist|\1tdelist|g" \
-e "s|([^a-zA-Z0-9]\|^)krecent|\1tderecent|g" \
-e "s|([^a-zA-Z0-9]\|^)kfont|\1tdefont|g" \
-e "s|([^a-zA-Z0-9]\|^)kpaste|\1tdepaste|g" \
-e "s|([^a-zA-Z0-9]\|^)kdisplay|\1tdedisplay|g" \
\
-e "s|([^a-zA-Z0-9]\|^)KStyle|\1TDEStyle|g" \
-e "s|([^a-zA-Z0-9]\|^)KIcon|\1TDEIcon|g" \
-e "s|([^a-zA-Z0-9]\|^)KZone|\1TDEZone|g" \
-e "s|([^a-zA-Z0-9]\|^)KCrash|\1TDECrash|g" \
-e "s|([^a-zA-Z0-9]\|^)KCmd|\1TDECmd|g" \
-e "s|([^a-zA-Z0-9]\|^)KAbout|\1TDEAbout|g" \
-e "s|([^a-zA-Z0-9]\|^)KComp|\1TDEComp|g" \
-e "s|([^a-zA-Z0-9]\|^)KGlobal|\1TDEGlobal|g" \
-e "s|([^a-zA-Z0-9]\|the\|^)KProcess|\1TDEProcess|g" \
-e "s|([^a-zA-Z0-9]\|^)kprocess|\1tdeprocess|g" \
-e "s|([^a-zA-Z0-9]\|^)kprocctrl|\1tdeprocctrl|g" \
-e "s|([^a-zA-Z0-9]\|^)KProcIO|\1TDEProcIO|g" \
-e "s|([^a-zA-Z0-9]\|^)kprocio|\1tdeprocio|g" \
-e "s|([^a-zA-Z0-9]\|^)KClipboard|\1TDEClipboard|g" \
-e "s|([^a-zA-Z0-9]\|^)Kwallet|\1TDEwallet|g" \
-e "s|([^a-zA-Z0-9]\|^)KWallet|\1TDEWallet|g" \
-e "s|([^a-zA-Z0-9]\|^)KWALLET|\1TDEWALLET|g" \
-e "s|([^a-zA-Z0-9]\|^)KDEsu|\1TDEsu|g" \
\
-e "s|([^a-zA-Z0-9]\|^)kcompletionbox|\1tdecompletionbox|g" \
\
-e "s|([^a-zA-Z0-9]\|^)kaboutapplication\.|\1tdeaboutapplication.|g" \
-e "s|([^a-zA-Z0-9]\|^)kaboutdata\.|\1tdeaboutdata.|g" \
-e "s|([^a-zA-Z0-9]\|^)kaboutdialog\.|\1tdeaboutdialog.|g" \
-e "s|([^a-zA-Z0-9]\|^)kaboutkde\.|\1tdeabouttde.|g" \
-e "s|([^a-zA-Z0-9]\|^)kcmdlineargs\.|\1tdecmdlineargs.|g" \
-e "s|([^a-zA-Z0-9]\|^)kapplication\.|\1tdeapplication.|g" \
-e "s|([^a-zA-Z0-9]\|^)kuniqueapplication\.|\1tdeuniqueapplication.|g" \
-e "s|([^a-zA-Z0-9]\|^)kstyle\.|\1tdestyle.|g" \
-e "s|([^a-zA-Z0-9]\|^)drawKStylePrimitive|\1drawTDEStylePrimitive|g" \
\
-e "s|([^a-zA-Z0-9]\|^)kdiroperator\.|\1tdediroperator.|g" \
-e "s|([^a-zA-Z0-9]\|^)klocale\.|\1tdelocale.|g" \
-e "s|([^a-zA-Z0-9]\|^)kmessagebox\.|\1tdemessagebox.|g" \
-e "s|([^a-zA-Z0-9]\|^)ktempfile\.|\1tdetempfile.|g" \
-e "s|([^a-zA-Z0-9]\|^)kemailsettings\.|\1tdeemailsettings.|g" \
-e "s|([^a-zA-Z0-9]\|^)kglobal\.|\1tdeglobal.|g" \
-e "s|([^a-zA-Z0-9]\|^)kglobalaccel\.h|\1tdeglobalaccel.h|g" \
-e "s|([^a-zA-Z0-9]\|^)kglobalsettings\.|\1tdeglobalsettings.|g" \
-e "s|([^a-zA-Z0-9]\|^)kmenubar\.|\1tdemenubar.|g" \
-e "s|([^a-zA-Z0-9]\|^)kprotocolmanager\.|\1tdeprotocolmanager.|g" \
-e "s|([^a-zA-Z0-9]\|^)kstartupinfo\.|\1tdestartupinfo.|g" \
-e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kabc|\1tdeabc|g" \
-e "s|([^a-zA-Z0-9]\|^)makekdewidgets|\1maketdewidgets|g" \
-e "s|([^a-zA-Z0-9]\|^)MAKEKDEWIDGETS|\1MAKETDEWIDGETS|g" \
-e "s|([^a-zA-Z0-9]\|^)kdewidgets|\1tdewidgets|g" \
-e "s|([^a-zA-Z0-9]\|^)Categories=Qt;KDE|\1Categories=Qt;TDE|g" \
-e "s|([^a-zA-Z0-9]\|^)X-KDE-|\1X-TDE-|g" \
-e "s|([^a-zA-Z0-9]\|^)kstandarddirs\.|\1tdestandarddirs.|g" \
-e "s|([^a-zA-Z0-9]\|^)kinstance\.h|\1tdeinstance.h|g" \
\
\
-e "s|kde\.org/tdehotnewstuff|kde.org/khotnewstuff|g" \
-e "s|tdevelop\.org|kdevelop.org|g" \
-e "s|tdewebdev\.org|kdewebdev.org|g" \
-e "s|t(develop[a-z_\-]*@[tk]develop\.org)|k\1|g" \
-e "s|\<tdelistr|klistr|g" \
-e "s|kde toolbar widget|tde toolbar widget|g"
# Convert desktop files
find ./ -type f -iname "*.desktop" -not -iwholename '*.git*' -print0 | \
xargs -r0 sed -i \
-e '/^Keyword/ { s,\,,;,g }' \
-e 's/^ServiceTypes=/X-TDE-ServiceTypes=/g' \
-e 's/^ServiceTypes\[\(.*\)\]=/X-TDE-ServiceTypes\[\1\]=/g' \
-e 's/^ExcludeServiceTypes=/X-TDE-ExcludeServiceTypes=/g' \
-e 's/^ExcludeServiceTypes\[\(.*\)\]=/X-TDE-ExcludeServiceTypes\[\1\]=/g' \
-e 's/^DocPath=/X-DocPath=/g' \
-e 's/^DocPath\[\(.*\)\]=/X-DocPath\[\1\]=/g' \
-e 's/^InitialPreference=/X-TDE-InitialPreference=/g' \
-e 's/^InitialPreference\[\(.*\)\]=/X-TDE-InitialPreference\[\1\]=/g'
# Rename files
find . -name "kio_*" | while read f; do mv "${f}" "${f/kio_/tdeio_}"; done
find . -name "kio-*" | while read f; do mv "${f}" "${f/kio-/tdeio-}"; done
find . -name "kio.*" | while read f; do mv "${f}" "${f/kio./tdeio.}"; done
find . -name "*.kdevelop" | while read f; do mv "${f}" "${f/.kdevelop/.tdevelop}"; done
find . -name "kdewidgets*" | while read f; do mv "${f}" "${f/kdewidgets/tdewidgets}"; done
# Update icon names (optional)
$SCRIPTPATH/convert_kde3_icon_names_to_xdg_standards

@ -1,20 +0,0 @@
#!/bin/bash
#
# (c) 2014-2015 Timothy Pearson
# All Rights Reserved
#
# WARNING
# This script is not complete!
# Hand editing will likely be required after running to ensure all icon names have been updated
# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names
THISSCRIPT=$(readlink -f $0)
if [[ ! -e "$THISSCRIPT" ]]; then
echo "Unable to find myself! Exiting..."
exit 1
fi
SCRIPTPATH=`dirname $THISSCRIPT`
$SCRIPTPATH/tde_mimetype_conversion
$SCRIPTPATH/tde_action_conversion
$SCRIPTPATH/tde_device_conversion

@ -1,154 +0,0 @@
#!/bin/bash
#
# (c) 2014 Timothy Pearson
# All Rights Reserved
#
# WARNING
# This script is not complete!
# Hand editing will likely be required after running to ensure all icon names have been updated
# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names
WORKDIR=$PWD
function rename_files {
echo '#!/bin/bash' > /tmp/rename_action_files
echo '' >> /tmp/rename_action_files
echo 'cd $1' >> /tmp/rename_action_files
echo '' >> /tmp/rename_action_files
echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_action_files
echo "ORIGNAME='$1'" >> /tmp/rename_action_files
echo "NEWNAME='$2'" >> /tmp/rename_action_files
echo '' >> /tmp/rename_action_files
echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_action_files
echo ' echo "Ignoring .git directory"' >> /tmp/rename_action_files
echo ' exit 0' >> /tmp/rename_action_files
echo 'fi' >> /tmp/rename_action_files
echo '' >> /tmp/rename_action_files
echo 'ls -d * | sed "s/\(.*\)action-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1action-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_action_files
echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_action_files
chmod 755 /tmp/rename_action_files
find ./ -type d -exec /tmp/rename_action_files {} \; &> /dev/null
rm /tmp/rename_action_files
}
function convert_files {
[ -d ~/tde-git/tde/main ] && \
cd ~/tde-git/tde/main
echo "==================================================="
echo "Converting $1..."
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "\(Icon\(Set\|\)( \?\)\"$1\"" | \
xargs -r0 sed -i "s/\(Icon\(Set\|\)( \?\)\"$1\"/\1\"$2\"/g"
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "<iconset>\"$1\"" | \
xargs -r0 sed -i "s/<iconset>\"$1\"/<iconset>\"$2\"/g"
find ./ -type f -iregex ".*\.\(directory\|desktop\|protocol\)" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "Icon=$1" | \
xargs -r0 sed -i "s/Icon=$1/Icon=$2/g"
find ./ -type f -iname "*.rc" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "icon=\"$1\"" | \
xargs -r0 sed -i "s/icon=\"$1\"/icon=\"$2\"/g"
echo "==================================================="
echo "Renaming $1..."
[ -d $WORKDIR/tdelibs/pics ] && \
cd $WORKDIR/tdelibs/pics && \
rename_files $1 $2
[ -d $WORKDIR/tdeartwork/IconThemes ] && \
cd $WORKDIR/tdeartwork/IconThemes && \
rename_files $1 $2
[ -d $WORKDIR/tdeaccessibility/IconThemes ] && \
cd $WORKDIR/tdeaccessibility/IconThemes && \
rename_files $1 $2
cd $WORKDIR
echo "==================================================="
echo "Still found in files:"
echo "==================================================="
find . -not -iwholename '*.git*' | xargs grep "\"$1\"" -sl
echo "==================================================="
echo ""
}
convert_files "previous" "go-previous"
convert_files "next" "go-next"
convert_files "start" "go-first"
convert_files "finish" "go-last"
convert_files "stop" "process-stop"
convert_files "lock" "system-lock-screen"
convert_files "exit" "system-log-out"
convert_files "run" "system-run"
convert_files "up" "go-up"
convert_files "down" "go-down"
convert_files "top" "go-top"
convert_files "bottom" "go-bottom"
convert_files "undo" "edit-undo"
convert_files "redo" "edit-redo"
convert_files "find" "edit-find"
convert_files "revert" "document-revert"
convert_files "filenew" "document-new"
convert_files "fileopen" "document-open"
convert_files "fileprint" "document-print"
convert_files "filequickprint" "document-print-preview"
convert_files "filesave" "document-save"
convert_files "filesaveas" "document-save-as"
convert_files "fileclose" "window-close"
convert_files "editclear" "edit-clear"
convert_files "editcopy" "edit-copy"
convert_files "editcut" "edit-cut"
convert_files "editdelete" "edit-delete"
convert_files "editpaste" "edit-paste"
convert_files "folder_new" "folder-new"
convert_files "gohome" "go-home"
convert_files "mail_forward" "mail-forward"
convert_files "mail_new" "mail-message-new"
convert_files "mail_replyall" "mail-reply-all"
convert_files "mail_reply" "mail-reply-sender"
convert_files "mail_send" "mail-send"
convert_files "player_pause" "media-playback-pause"
convert_files "player_play" "media-playback-start"
convert_files "player_stop" "media-playback-stop"
convert_files "player_rew" "media-seek-backward"
convert_files "player_fwd" "media-seek-forward"
convert_files "player_start" "media-skip-backward"
convert_files "player_end" "media-skip-forward"
convert_files "rotate_ccw" "object-rotate-left"
convert_files "rotate_cw" "object-rotate-right"
convert_files "window_fullscreen" "view-fullscreen"
convert_files "window_nofullscreen" "view-restore"
convert_files "window_new" "window-new"
convert_files "viewmagfit" "zoom-fit-best"
convert_files "viewmag+" "zoom-in"
convert_files "viewmag1" "zoom-original"
convert_files "viewmag-" "zoom-out"
convert_files "unindent" "format-indent-less"
convert_files "indent" "format-indent-more"
convert_files "centrejust" "format-justify-center"
convert_files "leftjust" "format-justify-left"
convert_files "rightjust" "format-justify-right"
convert_files "text_left" "format-text-direction-ltr"
convert_files "text_right" "format-text-direction-rtl"
convert_files "text_bold" "format-text-bold"
convert_files "text_italic" "format-text-italic"
convert_files "text_under" "format-text-underline"
convert_files "text_strike" "format-text-strikethrough"
convert_files "spellcheck" "tools-check-spelling"
convert_files "package_development" "applications-development"
convert_files "package_games" "applications-games"
convert_files "package_graphics" "applications-graphics"
convert_files "package_network" "applications-internet"
convert_files "package_multimedia" "applications-multimedia"
convert_files "package_wordprocessing" "applications-office"
convert_files "edu_science" "applications-science"
convert_files "package_utilities" "applications-utilities"
convert_files "input_devices_settings" "preferences-desktop-peripherals"
convert_files "kcmsystem" "preferences-system"
convert_files "personal" "preferences-desktop-personal"
convert_files "looknfeel" "preferences-desktop"

@ -1,141 +0,0 @@
#!/bin/bash
#
# (c) 2015 Timothy Pearson
# All Rights Reserved
#
# WARNING
# This script is not complete!
# Hand editing will likely be required after running to ensure all icon names have been updated
# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names
WORKDIR=$PWD
function rename_files {
echo '#!/bin/bash' > /tmp/rename_device_files
echo '' >> /tmp/rename_device_files
echo 'cd $1' >> /tmp/rename_device_files
echo '' >> /tmp/rename_device_files
echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_device_files
echo "ORIGNAME='$1'" >> /tmp/rename_device_files
echo "NEWNAME='$2'" >> /tmp/rename_device_files
echo '' >> /tmp/rename_device_files
echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_device_files
echo ' echo "Ignoring .git directory"' >> /tmp/rename_device_files
echo ' exit 0' >> /tmp/rename_device_files
echo 'fi' >> /tmp/rename_device_files
echo '' >> /tmp/rename_device_files
echo 'ls -d * | sed "s/\(.*\)device-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1device-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_device_files
echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_device_files
chmod 755 /tmp/rename_device_files
find ./ -type d -exec /tmp/rename_device_files {} \; &> /dev/null
rm /tmp/rename_device_files
}
function convert_files {
[ -d ~/tde-git/tde/main ] && \
cd ~/tde-git/tde/main
echo "==================================================="
echo "Converting $1..."
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "\(Icon\(Set\|\)( \?\)\"$1\"" | \
xargs -r0 sed -i "s/\(Icon\(Set\|\)( \?\)\"$1\"/\1\"$2\"/g"
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "<iconset>\"$1\"" | \
xargs -r0 sed -i "s/<iconset>\"$1\"/<iconset>\"$2\"/g"
find ./ -type f -iregex ".*\.\(directory\|desktop\|protocol\)" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "Icon=$1" | \
xargs -r0 sed -i "s/Icon=$1/Icon=$2/g"
find ./ -type f -iname "*.rc" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "icon=\"$1\"" | \
xargs -r0 sed -i "s/icon=\"$1\"/icon=\"$2\"/g"
echo "==================================================="
echo "Renaming $1..."
[ -d $WORKDIR/tdelibs/pics ] && \
cd $WORKDIR/tdelibs/pics && \
rename_files $1 $2
[ -d $WORKDIR/tdeartwork/IconThemes ] && \
cd $WORKDIR/tdeartwork/IconThemes && \
rename_files $1 $2
[ -d $WORKDIR/tdeaccessibility/IconThemes ] && \
cd $WORKDIR/tdeaccessibility/IconThemes && \
rename_files $1 $2
cd $WORKDIR
echo "==================================================="
echo "Still found in files:"
echo "==================================================="
find . -not -iwholename '*.git*' | xargs grep "\"$1\"" -sl
echo "==================================================="
echo ""
}
convert_files "system" "computer"
convert_files "hdd_unmount_encrypt" "drive-harddisk-encrypted"
convert_files "hdd_unmount_decrypt" "drive-harddisk-decrypted"
convert_files "hdd_mount_decrypt" "drive-harddisk-decrypted-mounted"
convert_files "hdd_unmount" "drive-harddisk"
convert_files "hdd_mount" "drive-harddisk-mounted"
convert_files "keyboard" "input-keyboard"
convert_files "mouse" "input-mouse"
convert_files "tablet" "input-tablet"
convert_files "sd_mmc_unmount_encrypt" "media-flash-sd_mmc-encrypted"
convert_files "sd_mmc_unmount_decrypt" "media-flash-sd_mmc-decrypted"
convert_files "sd_mmc_mount_decrypt" "media-flash-sd_mmc-decrypted-mounted"
convert_files "sd_mmc_unmount" "media-flash-sd_mmc"
convert_files "sd_mmc_mount" "media-flash-sd_mmc-mounted"
convert_files "usbpendrive_unmount_encrypt" "media-flash-usb-encrypted"
convert_files "usbpendrive_unmount_decrypt" "media-flash-usb-decrypted"
convert_files "usbpendrive_mount_decrypt" "media-flash-usb-decrypted-mounted"
convert_files "usbpendrive_unmount" "media-flash-usb"
convert_files "usbpendrive_mount" "media-flash-usb-mounted"
convert_files "smart_media_unmount_encrypt" "media-flash-smart_media-encrypted"
convert_files "smart_media_unmount_decrypt" "media-flash-smart_media-decrypted"
convert_files "smart_media_mount_decrypt" "media-flash-smart_media-decrypted-mounted"
convert_files "smart_media_unmount" "media-flash-smart_media"
convert_files "smart_media_mount" "media-flash-smart_media-mounted"
convert_files "memory_stick_unmount_encrypt" "media-flash-memory_stick-encrypted"
convert_files "memory_stick_unmount_decrypt" "media-flash-memory_stick-decrypted"
convert_files "memory_stick_mount_decrypt" "media-flash-memory_stick-decrypted-mounted"
convert_files "memory_stick_unmount" "media-flash-memory_stick"
convert_files "memory_stick_mount" "media-flash-memory_stick-mounted"
convert_files "compact_flash_unmount_encrypt" "media-flash-compact_flash-encrypted"
convert_files "compact_flash_unmount_decrypt" "media-flash-compact_flash-decrypted"
convert_files "compact_flash_mount_decrypt" "media-flash-compact_flash-decrypted-mounted"
convert_files "compact_flash_unmount" "media-flash-compact_flash"
convert_files "compact_flash_mount" "media-flash-compact_flash-mounted"
convert_files "3floppy_unmount" "media-floppy-3_5"
convert_files "3floppy_mount" "media-floppy-3_5-mounted"
convert_files "5floppy_unmount" "media-floppy-5_14"
convert_files "5floppy_mount" "media-floppy-5_14-mounted"
convert_files "zip_unmount" "media-floppy-zip"
convert_files "zip_mount" "media-floppy-zip-mounted"
convert_files "cdrom_unmount_encrypt" "media-optical-cdrom-encrypted"
convert_files "cdrom_unmount_decrypt" "media-optical-cdrom-decrypted"
convert_files "cdrom_mount_decrypt" "media-optical-cdrom-decrypted-mounted"
convert_files "cdrom_unmount" "media-optical-cdrom"
convert_files "cdrom_mount" "media-optical-cdrom-mounted"
convert_files "cdwriter_unmount_encrypt" "media-optical-cdwriter-encrypted"
convert_files "cdwriter_unmount_decrypt" "media-optical-cdwriter-decrypted"
convert_files "cdwriter_mount_decrypt" "media-optical-cdwriter-decrypted-mounted"
convert_files "cdwriter_unmount" "media-optical-cdwriter"
convert_files "cdwriter_mount" "media-optical-cdwriter-mounted"
convert_files "dvd_unmount_encrypt" "media-optical-dvd-encrypted"
convert_files "dvd_unmount_decrypt" "media-optical-dvd-decrypted"
convert_files "dvd_mount_decrypt" "media-optical-dvd-decrypted-mounted"
convert_files "dvd_unmount" "media-optical-dvd"
convert_files "dvd_mount" "media-optical-dvd-mounted"
convert_files "cdaudio_unmount" "media-optical-cdaudio"
convert_files "cdaudio_mount" "media-optical-cdaudio-mounted"
convert_files "tape_unmount" "media-tape"
convert_files "tape_mount" "media-tape-mounted"
convert_files "ipod_unmount" "multimedia-player"
convert_files "ipod_mount" "multimedia-player-mounted"
convert_files "printer1" "printer"

@ -1,169 +0,0 @@
#!/bin/bash
#
# (c) 2014 Timothy Pearson
# All Rights Reserved
#
# WARNING
# This script is not complete!
# Hand editing will likely be required after running to ensure all icon names have been updated
# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names
WORKDIR=$PWD
function rename_files {
echo '#!/bin/bash' > /tmp/rename_mime_files
echo '' >> /tmp/rename_mime_files
echo 'cd $1' >> /tmp/rename_mime_files
echo '' >> /tmp/rename_mime_files
echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_mime_files
echo "ORIGNAME='$1'" >> /tmp/rename_mime_files
echo "NEWNAME='$2'" >> /tmp/rename_mime_files
echo '' >> /tmp/rename_mime_files
echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_mime_files
echo ' echo "Ignoring .git directory"' >> /tmp/rename_mime_files
echo ' exit 0' >> /tmp/rename_mime_files
echo 'fi' >> /tmp/rename_mime_files
echo '' >> /tmp/rename_mime_files
echo 'ls -d * | sed "s/\(.*\)mime-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1mime-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_mime_files
echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_mime_files
chmod 755 /tmp/rename_mime_files
find ./ -type d -exec /tmp/rename_mime_files {} \; &> /dev/null
rm /tmp/rename_mime_files
}
function convert_files {
[ -d ~/tde-git/tde/main ] && \
cd ~/tde-git/tde/main
echo "==================================================="
echo "Converting $1..."
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "\(Icon\(Set\|\)( \?\)\"$1\"" | \
xargs -r0 sed -i "s/\(Icon\(Set\|\)( \?\)\"$1\"/\1\"$2\"/g"
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "<iconset>\"$1\"" | \
xargs -r0 sed -i "s/<iconset>\"$1\"/<iconset>\"$2\"/g"
find ./ -type f -iregex ".*\.\(directory\|desktop\|protocol\)" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "Icon=$1" | \
xargs -r0 sed -i "s/Icon=$1/Icon=$2/g"
find ./ -type f -iname "*.rc" -not -iwholename '*.git*' -print0 | \
xargs -r0 grep -ZIl "icon=\"$1\"" | \
xargs -r0 sed -i "s/icon=\"$1\"/icon=\"$2\"/g"
echo "==================================================="
echo "Renaming $1..."
[ -d $WORKDIR/tdelibs/pics ] && \
cd $WORKDIR/tdelibs/pics && \
rename_files $1 $2
[ -d $WORKDIR/tdeartwork/IconThemes ] && \
cd $WORKDIR/tdeartwork/IconThemes && \
rename_files $1 $2
[ -d $WORKDIR/tdeaccessibility/IconThemes ] && \
cd $WORKDIR/tdeaccessibility/IconThemes && \
rename_files $1 $2
cd $WORKDIR
echo "==================================================="
echo "Still found in files:"
echo "==================================================="
find . -not -iwholename '*.git*' | xargs grep "\"$1\"" -sl
echo "==================================================="
echo ""
}
convert_files "sound" "audio-x-generic"
convert_files "font" "font-x-generic"
convert_files "image" "image-x-generic"
convert_files "html" "text-html"
convert_files "document" "text-x-generic"
convert_files "document2" "text-x-generic-template"
convert_files "shellscript" "text-x-script"
convert_files "video" "video-x-generic"
convert_files "vcard" "x-office-address-book"
convert_files "vcalendar" "x-office-calendar"
convert_files "kword_kwd" "x-office-document"
convert_files "applix" "application-x-applix-word"
convert_files "ascii" "text-vnd\.tde\.ascii"
convert_files "binary" "application-octet-stream"
convert_files "bt" "application-x-bittorrent"
convert_files "cdimage" "application-x-cd-image"
convert_files "cdr" "application-x-cdr"
convert_files "cdtrack" "application-x-cda"
convert_files "colorscm" "application-x-kcsrc"
convert_files "core" "application-x-core"
convert_files "database" "application-vnd\.oasis\.opendocument\.database"
convert_files "deb" "application-x-deb"
convert_files "drawing" "application-vnd\.oasis\.opendocument\.graphics"
convert_files "dvi" "application-x-lyx"
convert_files "empty" "application-x-zerosize"
convert_files "exec" "application-x-executable"
convert_files "exec_wine" "application-x-mswinurl"
convert_files "file_locked" "application-vnd\.tde\.file\.locked"
convert_files "file_temporary" "application-vnd\.tde\.file\.temporary"
convert_files "font_bitmap" "application-x-font-snf"
convert_files "font_truetype" "application-x-font-ttf"
convert_files "font_type1" "application-x-font-type1"
convert_files "gettext" "application-x-gettext"
convert_files "gf" "application-x-tex-gf"
convert_files "info" "application-vnd\.tde\.info"
convert_files "karbon_karbon" "application-x-karbon"
convert_files "kchart_chrt" "application-x-kchart"
convert_files "kexi_kexi" "application-x-kexi"
convert_files "kformula_kfo" "application-x-kformula"
convert_files "kivio_flw" "application-x-kivio"
convert_files "kpresenter_kpr" "application-x-kpresenter"
convert_files "krita_kra" "application-x-krita"
convert_files "kspread_ksp" "application-x-kspread"
convert_files "kugar_kud" "application-x-kugar"
convert_files "log" "text-x-log"
convert_files "make" "text-x-makefile"
convert_files "man" "application-x-troff-man"
convert_files "metafont" "application-x-metafont"
convert_files "midi" "audio-midi"
convert_files "misc" "application-vnd\.tde\.misc"
convert_files "netscape_doc" "application-x-netscape"
convert_files "pdf" "application-pdf"
convert_files "pk" "application-x-tex-pk"
convert_files "postscript" "application-postscript"
convert_files "presentation" "application-vnd\.oasis\.opendocument\.presentation"
convert_files "quicktime" "video-x-quicktime"
convert_files "readme" "text-x-readme"
convert_files "recycled" "application-x-trash"
convert_files "resource" "application-vnd\.tde\.resource"
convert_files "rpm" "application-x-rpm"
convert_files "rtf" "text-rtf"
convert_files "soffice" "application-x-soffice"
convert_files "source_c" "text-x-csrc"
convert_files "source_cpp" "text-x-c++src"
convert_files "source_f" "text-x-fortran"
convert_files "source_h" "text-x-hsrc"
convert_files "source_java" "text-x-java"
convert_files "source_j" "text-x-jsrc"
convert_files "source_l" "text-x-lsrc"
convert_files "source_moc" "text-x-mocsrc"
convert_files "source_o" "text-x-osrc"
convert_files "source_php" "text-x-php"
convert_files "source_pl" "text-x-perl"
convert_files "source" "text-x-src"
convert_files "source_p" "text-x-psrc"
convert_files "source_py" "text-x-python"
convert_files "source_s" "text-x-asm"
convert_files "source_y" "text-x-ysrc"
convert_files "spreadsheet" "application-vnd\.oasis\.opendocument\.spreadsheet"
convert_files "tar" "application-x-tar"
convert_files "tdemultiple" "application-vnd\.tde\.tdemultiple"
convert_files "template_source" "application-vnd\.tde\.template_source"
convert_files "tex" "text-x-tex"
convert_files "tgz" "application-x-tarz"
convert_files "txt2" "application-vnd\.tde\.text\.alt"
convert_files "txt" "text-plain"
convert_files "vectorgfx" "image-svg+xml"
convert_files "widget_doc" "application-x-designer"
convert_files "wordprocessing" "application-vnd\.oasis\.opendocument\.text"
convert_files "zip" "application-vnd\.tde\.overlay\.zip"

@ -1,718 +0,0 @@
#!/bin/bash
find ./ -type f -iname "*.c*" -o -iname "*.h*" -o -iname "*.ui*" -o -name "*.kcfg" -o -name "*.ypp" -not -iwholename '*.git*' |\
tr "\n" "\0" |\
xargs -r0 sed -i \
-e 's/^Q\([A-Z]\)\([_a-zA-Z]\)/TQ\1\2/g' \
-e 's/\([^_]\)Q\([A-Z]\)\([_a-zA-Z]\)/\1TQ\2\3/g' \
-e 's/Qt/TQt/g' \
-e 's/TTQ/TQ/g' \
-e 's/TTQ/TQ/g' \
-e 's/TTQ/TQ/g' \
-e 's/TTQ/TQ/g'
# Move the library
find ./ -type f -iname "*" -not -iwholename '*.git*' -print0 |\
xargs -r0 sed -i \
-e 's/qt-mt/tqt-mt/g' \
-e 's/qui/tqui/g'
# Back out changes we did not want to make
find ./ -type f -iname "*" -not -iwholename '*.git*' -print0 |\
xargs -r0 sed -i \
-e 's/TQT_/QT_/g' \
-e 's/TQCStringList/QCStringList/g' \
-e 's/TQMAKE/QMAKE/g' \
-e 's/TQTDIR/QTDIR/g' \
-e 's/OBLITQUE/OBLIQUE/g' \
-e 's/ATQUA/AQUA/g' \
\
-e 's/QUType_Q/QUType_TQ/g' \
-e 's/\([ (]\)Q\#\#/\1TQ\#\#/g' \
-e 's/STQL/SQL/g' \
\
-e 's/keyCodeTQt/keyCodeQt/g' \
-e 's/kontqui/konqui/g' \
-e 's/tquiv/quiv/g' \
\
-e 's/\([^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)tquit/\1quit/g' \
-e 's/^tquit/quit/g' \
\
-e 's/ACTQUIRE/ACQUIRE/g' \
-e 's/Actquire/Acquire/g' \
-e 's/actquire/acquire/g' \
-e 's/LITQUID/LIQUID/g' \
-e 's/Litquid/Liquid/g' \
-e 's/litquid/liquid/g' \
-e 's/OPATQUE/OPAQUE/g' \
-e 's/Opatque/Opaque/g' \
-e 's/opatque/opaque/g' \
-e 's/RETQUIRE/REQUIRE/g' \
-e 's/Retquire/Require/g' \
-e 's/retquire/require/g'
# Apply changes that should have been made but were not
find ./ -type f -iname "*" -not -iwholename '*.git*' -print0 |\
xargs -r0 sed -i 's/aboutQt/aboutTQt/g'
# Back out linear alphabet string changes
find ./ -type f -iname "*" -not -iwholename '*.git*' -print0 |\
xargs -r0 sed -i \
-e 's/MNOPTQR/MNOPQR/g' \
\
-e 's/QT_VERSION/TQT_VERSION/g' \
-e 's/QT_BUILD_KEY/TQT_BUILD_KEY/g' \
-e 's/Q_PACKED/TQ_PACKED/g' \
-e 's/Q_INT64_C/TQ_INT64_C/g' \
-e 's/Q_UINT64_C/TQ_UINT64_C/g' \
-e 's/Q_CHECK_PTR/TQ_CHECK_PTR/g' \
-e 's/Q_DISABLE_COPY/TQ_DISABLE_COPY/g' \
-e 's/QT_MODULE_/TQT_MODULE_/g' \
-e 's/TTQT_MODULE_/TQT_MODULE_/g' \
-e 's/QT_TR_FUNCTIONS/TQT_TR_FUNCTIONS/g' \
-e 's/RGB_MASK/TQT_RGB_MASK/g' \
\
-e 's/\([-()+/{*},.>!:=&[\t ]\)qRound/\1tqRound/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSwap/\1tqSwap/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qstrlen/\1tqstrlen/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qstrncmp/\1tqstrncmp/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qUncompress/\1tqUncompress/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qCopy/\1tqCopy/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qCopyBackward/\1tqCopyBackward/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qEqual/\1tqEqual/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qFill/\1tqFill/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qFind/\1tqFind/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qCount/\1tqCount/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qHash/\1tqHash/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qAppName/\1tqAppName/g' \
\
-e 's/^qRound/tqRound/g' \
-e 's/^qSwap/tqSwap/g' \
-e 's/^qstrlen/tqstrlen/g' \
-e 's/^qstrncmp/tqstrncmp/g' \
-e 's/^qUncompress/tqUncompress/g' \
-e 's/^qCopy/tqCopy/g' \
-e 's/^qCopyBackward/tqCopyBackward/g' \
-e 's/^qEqual/tqEqual/g' \
-e 's/^qFill/tqFill/g' \
-e 's/^qFind/tqFind/g' \
-e 's/^qCount/tqCount/g' \
-e 's/^qHash/tqHash/g' \
-e 's/^qAppName/tqAppName/g' \
\
-e 's/\([-()+/{*},.>!:=&[\t ]\)qRed/\1tqRed/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qGreen/\1tqGreen/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qBlue/\1tqBlue/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qAlpha/\1tqAlpha/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qRgb/\1tqRgb/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qGray/\1tqGray/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qApp/\1tqApp/g' \
\
-e 's/^qRed/tqRed/g' \
-e 's/^qGreen/tqGreen/g' \
-e 's/^qBlue/tqBlue/g' \
-e 's/^qAlpha/tqAlpha/g' \
-e 's/^qRgb/tqRgb/g' \
-e 's/^qGray/tqGray/g' \
-e 's/^qApp/tqApp/g' \
\
-e 's/\([-()+/{*},.>!:=&[\t ]\)qAddPostRoutine/\1tqAddPostRoutine/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qWarning/\1tqWarning/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSharedBuild/\1tqSharedBuild/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qNetworkProtocolRegister/\1tqNetworkProtocolRegister/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qDebug/\1tqDebug/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qCompress/\1tqCompress/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qFatal/\1tqFatal/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSqlDriverExtDict/\1tqSqlDriverExtDict/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSqlOpenExtDict/\1tqSqlOpenExtDict/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qInitNetworkProtocols/\1tqInitNetworkProtocols/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSuppressObsoleteWarnings/\1tqSuppressObsoleteWarnings/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qChecksum/\1tqChecksum/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qRemovePostRoutine/\1tqRemovePostRoutine/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qInstallPath/\1tqInstallPath/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qObsolete/\1tqObsolete/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qVersion/\1tqVersion/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSystemWarning/\1tqSystemWarning/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qSysInfo/\1tqSysInfo/g' \
\
-e 's/^qAddPostRoutine/tqAddPostRoutine/g' \
-e 's/^qWarning/tqWarning/g' \
-e 's/^qSharedBuild/tqSharedBuild/g' \
-e 's/^qNetworkProtocolRegister/tqNetworkProtocolRegister/g' \
-e 's/^qDebug/tqDebug/g' \
-e 's/^qCompress/tqCompress/g' \
-e 's/^qFatal/tqFatal/g' \
-e 's/^qSqlDriverExtDict/tqSqlDriverExtDict/g' \
-e 's/^qSqlOpenExtDict/tqSqlOpenExtDict/g' \
-e 's/^qInitNetworkProtocols/tqInitNetworkProtocols/g' \
-e 's/^qSuppressObsoleteWarnings/tqSuppressObsoleteWarnings/g' \
-e 's/^qChecksum/tqChecksum/g' \
-e 's/^qRemovePostRoutine/tqRemovePostRoutine/g' \
-e 's/^qInstallPath/tqInstallPath/g' \
-e 's/^qObsolete/tqObsolete/g' \
-e 's/^qVersion/tqVersion/g' \
-e 's/^qSystemWarning/tqSystemWarning/g' \
-e 's/^qSysInfo/tqSysInfo/g' \
\
-e 's/\([-()+/{*},.>!:=&[\t ]\)qmemmove/\1tqmemmove/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qstrncpy/\1tqstrncpy/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qstrdup/\1tqstrdup/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qstrnicmp/\1tqstrnicmp/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qstricmp/\1tqstricmp/g' \
\
-e 's/^qmemmove/tqmemmove/g' \
-e 's/^qstrncpy/tqstrncpy/g' \
-e 's/^qstrdup/tqstrdup/g' \
-e 's/^qstrnicmp/tqstrnicmp/g' \
-e 's/^qstricmp/tqstricmp/g' \
\
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_get_application_thread_id/\1tqt_get_application_thread_id/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_x_user_time/\1tqt_x_user_time/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_xget_temp_gc/\1tqt_xget_temp_gc/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_has_xft/\1tqt_has_xft/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_modal_state/\1tqt_modal_state/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_check_pointer/\1tqt_check_pointer/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_preliminary_signal_spy/\1tqt_preliminary_signal_spy/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_wm_take_focus/\1tqt_wm_take_focus/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_global_mutexpool/\1tqt_global_mutexpool/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_xdisplay/\1tqt_xdisplay/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_resolve_symlinks/\1tqt_resolve_symlinks/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_qclipboard_bailout_hack/\1tqt_qclipboard_bailout_hack/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_x_time/\1tqt_x_time/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_wm_delete_window/\1tqt_wm_delete_window/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_qheader_label_return_null_strings/\1tqt_qheader_label_return_null_strings/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_xscreen/\1tqt_xscreen/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_setAccelAutoShortcuts/\1tqt_setAccelAutoShortcuts/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_sm_client_id/\1tqt_sm_client_id/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_set_table_clipper_enabled/\1tqt_set_table_clipper_enabled/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_hebrew_keyboard_hack/\1tqt_hebrew_keyboard_hack/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_use_native_dialogs/\1tqt_use_native_dialogs/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_generate_epsf/\1tqt_generate_epsf/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_xget_readonly_gc/\1tqt_xget_readonly_gc/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_use_xrender/\1tqt_use_xrender/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_set_x11_event_filter/\1tqt_set_x11_event_filter/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_xrootwin/\1tqt_xrootwin/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_wm_protocols/\1tqt_wm_protocols/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_ftp_filename_codec/\1tqt_ftp_filename_codec/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_window_role/\1tqt_window_role/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_tab_all_widgets/\1tqt_tab_all_widgets/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_wm_state/\1tqt_wm_state/g' \
\
-e 's/^qt_get_application_thread_id/tqt_get_application_thread_id/g' \
-e 's/^qt_x_user_time/tqt_x_user_time/g' \
-e 's/^qt_xget_temp_gc/tqt_xget_temp_gc/g' \
-e 's/^qt_has_xft/tqt_has_xft/g' \
-e 's/^qt_modal_state/tqt_modal_state/g' \
-e 's/^qt_check_pointer/tqt_check_pointer/g' \
-e 's/^qt_preliminary_signal_spy/tqt_preliminary_signal_spy/g' \
-e 's/^qt_wm_take_focus/tqt_wm_take_focus/g' \
-e 's/^qt_global_mutexpool/tqt_global_mutexpool/g' \
-e 's/^qt_xdisplay/tqt_xdisplay/g' \
-e 's/^qt_resolve_symlinks/tqt_resolve_symlinks/g' \
-e 's/^qt_qclipboard_bailout_hack/tqt_qclipboard_bailout_hack/g' \
-e 's/^qt_x_time/tqt_x_time/g' \
-e 's/^qt_wm_delete_window/tqt_wm_delete_window/g' \
-e 's/^qt_qheader_label_return_null_strings/tqt_qheader_label_return_null_strings/g' \
-e 's/^qt_xscreen/tqt_xscreen/g' \
-e 's/^qt_setAccelAutoShortcuts/tqt_setAccelAutoShortcuts/g' \
-e 's/^qt_sm_client_id/tqt_sm_client_id/g' \
-e 's/^qt_set_table_clipper_enabled/tqt_set_table_clipper_enabled/g' \
-e 's/^qt_hebrew_keyboard_hack/tqt_hebrew_keyboard_hack/g' \
-e 's/^qt_use_native_dialogs/tqt_use_native_dialogs/g' \
-e 's/^qt_generate_epsf/tqt_generate_epsf/g' \
-e 's/^qt_xget_readonly_gc/tqt_xget_readonly_gc/g' \
-e 's/^qt_use_xrender/tqt_use_xrender/g' \
-e 's/^qt_set_x11_event_filter/tqt_set_x11_event_filter/g' \
-e 's/^qt_xrootwin/tqt_xrootwin/g' \
-e 's/^qt_wm_protocols/tqt_wm_protocols/g' \
-e 's/^qt_ftp_filename_codec/tqt_ftp_filename_codec/g' \
-e 's/^qt_window_role/tqt_window_role/g' \
-e 's/^qt_tab_all_widgets/tqt_tab_all_widgets/g' \
-e 's/^qt_wm_state/tqt_wm_state/g' \
\
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_init/\1tqt_init/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_cleanup/\1tqt_cleanup/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_is_gui_used/\1tqt_is_gui_used/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_appType/\1tqt_appType/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_application_thread_id/\1tqt_application_thread_id/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_setMaxWindowRect/\1tqt_setMaxWindowRect/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_desktopWidget/\1tqt_desktopWidget/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_clipboard/\1tqt_clipboard/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_modal_stack/\1tqt_modal_stack/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_std_pal/\1tqt_std_pal/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_create_std_palette/\1tqt_create_std_palette/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_fix_tooltips/\1tqt_fix_tooltips/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_explicit_app_style/\1tqt_explicit_app_style/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_app_has_font/\1tqt_app_has_font/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_maxWindowRect/\1tqt_maxWindowRect/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_mutex/\1tqt_mutex/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_try_modal/\1tqt_try_modal/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_enter_modal/\1tqt_enter_modal/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_inheritedBy/\1tqt_inheritedBy/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_leave_modal/\1tqt_leave_modal/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_tryAccelEvent/\1tqt_tryAccelEvent/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_find_obj_child/\1tqt_find_obj_child/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_tryModalHelper/\1tqt_tryModalHelper/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_ucm_initialize/\1tqt_ucm_initialize/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_tryComposeUnicode/\1tqt_tryComposeUnicode/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_dispatchAccelEvent/\1tqt_dispatchAccelEvent/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_dispatchEnterLeave/\1tqt_dispatchEnterLeave/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_x11_enforce_cursor/\1tqt_x11_enforce_cursor/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_wait_for_window_manager/\1tqt_wait_for_window_manager/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_property/\1tqt_property/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_static_property/\1tqt_static_property/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_cast/\1tqt_cast/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_emit/\1tqt_emit/g' \
-e 's/\([-()+/{*},.>!:=&[\t ]\)qt_invoke/\1tqt_invoke/g' \
\
-e 's/^qt_init/tqt_init/g' \
-e 's/^qt_cleanup/tqt_cleanup/g' \
-e 's/^qt_is_gui_used/tqt_is_gui_used/g' \
-e 's/^qt_appType/tqt_appType/g' \
-e 's/^qt_application_thread_id/tqt_application_thread_id/g' \
-e 's/^qt_setMaxWindowRect/tqt_setMaxWindowRect/g' \
-e 's/^qt_desktopWidget/tqt_desktopWidget/g' \
-e 's/^qt_clipboard/tqt_clipboard/g' \
-e 's/^qt_modal_stack/tqt_modal_stack/g' \
-e 's/^qt_std_pal/tqt_std_pal/g' \
-e 's/^qt_create_std_palette/tqt_create_std_palette/g' \
-e 's/^qt_fix_tooltips/tqt_fix_tooltips/g' \
-e 's/^qt_explicit_app_style/tqt_explicit_app_style/g' \
-e 's/^qt_app_has_font/tqt_app_has_font/g' \
-e 's/^qt_maxWindowRect/tqt_maxWindowRect/g' \
-e 's/^qt_mutex/tqt_mutex/g' \
-e 's/^qt_try_modal/tqt_try_modal/g' \
-e 's/^qt_enter_modal/tqt_enter_modal/g' \
-e 's/^qt_inheritedBy/tqt_inheritedBy/g' \
-e 's/^qt_leave_modal/tqt_leave_modal/g' \
-e 's/^qt_tryAccelEvent/tqt_tryAccelEvent/g' \
-e 's/^qt_find_obj_child/tqt_find_obj_child/g' \
-e 's/^qt_tryModalHelper/tqt_tryModalHelper/g' \
-e 's/^qt_ucm_initialize/tqt_ucm_initialize/g' \
-e 's/^qt_tryComposeUnicode/tqt_tryComposeUnicode/g' \
-e 's/^qt_dispatchAccelEvent/tqt_dispatchAccelEvent/g' \
-e 's/^qt_dispatchEnterLeave/tqt_dispatchEnterLeave/g' \
-e 's/^qt_x11_enforce_cursor/tqt_x11_enforce_cursor/g' \
-e 's/^qt_wait_for_window_manager/tqt_wait_for_window_manager/g' \
-e 's/^qt_property/tqt_property/g' \
-e 's/^qt_static_property/tqt_static_property/g' \
-e 's/^qt_cast/tqt_cast/g' \
-e 's/^qt_emit/tqt_emit/g' \
-e 's/^qt_invoke/tqt_invoke/g' \
\
-e 's/Q_INT8/TQ_INT8/g' \
-e 's/Q_INT16/TQ_INT16/g' \
-e 's/Q_INT32/TQ_INT32/g' \
-e 's/Q_INT64/TQ_INT64/g' \
-e 's/Q_UINT8/TQ_UINT8/g' \
-e 's/Q_UINT16/TQ_UINT16/g' \
-e 's/Q_UINT32/TQ_UINT32/g' \
-e 's/Q_UINT64/TQ_UINT64/g' \
-e 's/Q_LONG/TQ_LONG/g' \
-e 's/Q_LLONG/TQ_LLONG/g' \
-e 's/Q_ULONG/TQ_ULONG/g' \
-e 's/Q_ULLONG/TQ_ULLONG/g' \
\
-e 's/TTQ_INT/TQ_INT/g' \
-e 's/TTQ_UINT/TQ_UINT/g' \
\
-e 's/Q_PROPERTY/TQ_PROPERTY/g' \
-e 's/Q_ENUMS/TQ_ENUMS/g' \
-e 's/Q_SETS/TQ_SETS/g' \
-e 's/Q_OVERRIDE/TQ_OVERRIDE/g' \
-e 's/Q_CLASSINFO/TQ_CLASSINFO/g' \
\
-e 's/QT_POINTER_SIZE/TQT_POINTER_SIZE/g' \
-e 's/\([^T]\)Qt3/\1TQt3/g' \
-e 's/qt_main_thread/tqt_main_thread/g' \
\
-e 's/RETQUEST/REQUEST/g' \
-e 's/Actquire/Acquire/g' \
-e 's/CONSETQUENTIAL/CONSEQUENTIAL/g' \
-e 's/ETQUAL/EQUAL/g' \
-e 's/ETQUATION/EQUATION/g' \
-e 's/ETQUIV/EQUIV/g' \
-e 's/Etquip/Equip/g' \
-e 's/Intquire/Inquire/g' \
-e 's/Martquis/Marquis/g' \
-e 's/PRODTQUOT/PRODQUOT/g' \
-e 's/Retquire/Require/g' \
-e 's/Retquiring/Requiring/g' \
-e 's/SETQUENCE/SEQUENCE/g' \
-e 's/SETQUENT/SEQUENT/g' \
-e 's/STQUARE/SQUARE/g' \
-e 's/TQUALITY/QUALITY/g' \
-e 's/TQUARTER/QUARTER/g' \
-e 's/TQUERY/QUERY/g' \
-e 's/TQUESTION/QUESTION/g' \
-e 's/TQUEUE/QUEUE/g' \
-e 's/TQUICK/QUICK/g' \
-e 's/TQUIT/QUIT/g' \
-e 's/TQUOTATION/QUOTATION/g' \
-e 's/UNITQUE/UNIQUE/g' \
-e 's/actquire/acquire/g' \
-e 's/actquiring/acquiring/g' \
-e 's/actquisition/acquisition/g' \
-e 's/etquip/equip/g' \
-e 's/intquire/inquire/g' \
-e 's/intquiries/inquiries/g' \
-e 's/martquis/marquis/g' \
-e 's/relintquish/relinquish/g' \
-e 's/retquier/requier/g' \
-e 's/retquire/require/g' \
-e 's/retquiring/requiring/g' \
-e 's/retquisite/requisite/g' \
-e 's/stquirt/squirt/g' \
-e 's/tquick/quick/g' \
-e 's/tquiet/quiet/g' \
-e 's/tquirk/quirk/g' \
-e 's/tquit/quit/g' \
-e 's/tquiz/quiz/g' \
-e 's/ubitquitous/ubiquitous/g' \
-e 's/unitquifying/uniquifying/g'
# Additional changes for TDE R14.2.0+
find ./ -type f -iname "*" -not -iwholename '*.git*' -print0 |\
xargs -r0 sed -i \
-e "s|\bguiThread\b|coreThread|g" \
-e "s|\bguiThreadAwake\b|coreThreadAwake|g" \
-e "s|\bfinishGuiThread\b|finishCoreThread|g" \
-e "s|\bisGuiThread\b|isCoreThread|g" \
-e "s|\bwakeUpGuiThread\b|wakeUpCoreThread|g"
# Headers
find ./ -type f -iname "*" -not -iwholename '*.git*' -print0 |\
xargs -r0 sed -i \
-e 's/q1xcompatibility\.h/tq1xcompatibility\.h/g' \
-e 's/qabstractlayout\.h/tqabstractlayout\.h/g' \
-e 's/qaccel\.h/tqaccel\.h/g' \
-e 's/qaccessible\.h/tqaccessible\.h/g' \
-e 's/qaction\.h/tqaction\.h/g' \
-e 's/qapp\.h/tqapp\.h/g' \
-e 's/qapplication\.h/tqapplication\.h/g' \
-e 's/qarray\.h/tqarray\.h/g' \
-e 's/qasciicache\.h/tqasciicache\.h/g' \
-e 's/qasciidict\.h/tqasciidict\.h/g' \
-e 's/qassistantclient\.h/tqassistantclient\.h/g' \
-e 's/qasyncimageio\.h/tqasyncimageio\.h/g' \
-e 's/qasyncio\.h/tqasyncio\.h/g' \
-e 's/qbig5codec\.h/tqbig5codec\.h/g' \
-e 's/qbitarray\.h/tqbitarray\.h/g' \
-e 's/qbitarry\.h/tqbitarry\.h/g' \
-e 's/qbitmap\.h/tqbitmap\.h/g' \
-e 's/qbrush\.h/tqbrush\.h/g' \
-e 's/qbttngrp\.h/tqbttngrp\.h/g' \
-e 's/qbuffer\.h/tqbuffer\.h/g' \
-e 's/qbuttongroup\.h/tqbuttongroup\.h/g' \
-e 's/qbutton\.h/tqbutton\.h/g' \
-e 's/qcache\.h/tqcache\.h/g' \
-e 's/qcanvas\.h/tqcanvas\.h/g' \
-e 's/qcdestyle\.h/tqcdestyle\.h/g' \
-e 's/qcheckbox\.h/tqcheckbox\.h/g' \
-e 's/qchkbox\.h/tqchkbox\.h/g' \
-e 's/qcleanuphandler\.h/tqcleanuphandler\.h/g' \
-e 's/qclipboard\.h/tqclipboard\.h/g' \
-e 's/qclipbrd\.h/tqclipbrd\.h/g' \
-e 's/qcollect\.h/tqcollect\.h/g' \
-e 's/qcollection\.h/tqcollection\.h/g' \
-e 's/qcolordialog\.h/tqcolordialog\.h/g' \
-e 's/qcolor\.h/tqcolor\.h/g' \
-e 's/qcombobox\.h/tqcombobox\.h/g' \
-e 's/qcombo\.h/tqcombo\.h/g' \
-e 's/qcommonstyle\.h/tqcommonstyle\.h/g' \
-e 's/qcompactstyle\.h/tqcompactstyle\.h/g' \
-e 's/qconfig\.h/tqconfig\.h/g' \
-e 's/qconnect\.h/tqconnect\.h/g' \
-e 's/qconnection\.h/tqconnection\.h/g' \
-e 's/qcstring\.h/tqcstring\.h/g' \
-e 's/qcursor\.h/tqcursor\.h/g' \
-e 's/qdatabrowser\.h/tqdatabrowser\.h/g' \
-e 's/qdatastream\.h/tqdatastream\.h/g' \
-e 's/qdatatable\.h/tqdatatable\.h/g' \
-e 's/qdataview\.h/tqdataview\.h/g' \
-e 's/qdatetimeedit\.h/tqdatetimeedit\.h/g' \
-e 's/qdatetime\.h/tqdatetime\.h/g' \
-e 's/qdatetm\.h/tqdatetm\.h/g' \
-e 's/qdeepcopy\.h/tqdeepcopy\.h/g' \
-e 's/qdesktopwidget\.h/tqdesktopwidget\.h/g' \
-e 's/qdial\.h/tqdial\.h/g' \
-e 's/qdialog\.h/tqdialog\.h/g' \
-e 's/qdict\.h/tqdict\.h/g' \
-e 's/qdir\.h/tqdir\.h/g' \
-e 's/qdns\.h/tqdns\.h/g' \
-e 's/qdockarea\.h/tqdockarea\.h/g' \
-e 's/qdockwindow\.h/tqdockwindow\.h/g' \
-e 's/qdom\.h/tqdom\.h/g' \
-e 's/qdragobject\.h/tqdragobject\.h/g' \
-e 's/qdrawutil\.h/tqdrawutil\.h/g' \
-e 's/qdrawutl\.h/tqdrawutl\.h/g' \
-e 's/qdropsite\.h/tqdropsite\.h/g' \
-e 's/qdstream\.h/tqdstream\.h/g' \
-e 's/qeditorfactory\.h/tqeditorfactory\.h/g' \
-e 's/qerrormessage\.h/tqerrormessage\.h/g' \
-e 's/qeucjpcodec\.h/tqeucjpcodec\.h/g' \
-e 's/qeuckrcodec\.h/tqeuckrcodec\.h/g' \
-e 's/qevent\.h/tqevent\.h/g' \
-e 's/qeventloop\.h/tqeventloop\.h/g' \
-e 's/qfeatures\.h/tqfeatures\.h/g' \
-e 's/qfiledef\.h/tqfiledef\.h/g' \
-e 's/qfiledialog\.h/tqfiledialog\.h/g' \
-e 's/qfiledlg\.h/tqfiledlg\.h/g' \
-e 's/qfile\.h/tqfile\.h/g' \
-e 's/qfileinf\.h/tqfileinf\.h/g' \
-e 's/qfileinfo\.h/tqfileinfo\.h/g' \
-e 's/qfocusdata\.h/tqfocusdata\.h/g' \
-e 's/qfontdatabase\.h/tqfontdatabase\.h/g' \
-e 's/qfontdialog\.h/tqfontdialog\.h/g' \
-e 's/qfont\.h/tqfont\.h/g' \
-e 's/qfontinf\.h/tqfontinf\.h/g' \
-e 's/qfontinfo\.h/tqfontinfo\.h/g' \
-e 's/qfontmet\.h/tqfontmet\.h/g' \
-e 's/qfontmetrics\.h/tqfontmetrics\.h/g' \
-e 's/qframe\.h/tqframe\.h/g' \
-e 's/qftp\.h/tqftp\.h/g' \
-e 's/qgarray\.h/tqgarray\.h/g' \
-e 's/qgb18030codec\.h/tqgb18030codec\.h/g' \
-e 's/qgbkcodec\.h/tqgbkcodec\.h/g' \
-e 's/qgcache\.h/tqgcache\.h/g' \
-e 's/qgdict\.h/tqgdict\.h/g' \
-e 's/qgeneric\.h/tqgeneric\.h/g' \
-e 's/qgif\.h/tqgif\.h/g' \
-e 's/qglcolormap\.h/tqglcolormap\.h/g' \
-e 's/qgl\.h/tqgl\.h/g' \
-e 's/qglist\.h/tqglist\.h/g' \
-e 's/qglobal\.h/tqglobal\.h/g' \
-e 's/qgplugin\.h/tqgplugin\.h/g' \
-e 's/qgrid\.h/tqgrid\.h/g' \
-e 's/qgridview\.h/tqgridview\.h/g' \
-e 's/qgroupbox\.h/tqgroupbox\.h/g' \
-e 's/qgrpbox\.h/tqgrpbox\.h/g' \
-e 's/qguardedptr\.h/tqguardedptr\.h/g' \
-e 's/qgvector\.h/tqgvector\.h/g' \
-e 's/qhbox\.h/tqhbox\.h/g' \
-e 's/qhbuttongroup\.h/tqhbuttongroup\.h/g' \
-e 's/qheader\.h/tqheader\.h/g' \
-e 's/qhgroupbox\.h/tqhgroupbox\.h/g' \
-e 's/qhostaddress\.h/tqhostaddress\.h/g' \
-e 's/qhttp\.h/tqhttp\.h/g' \
-e 's/qiconset\.h/tqiconset\.h/g' \
-e 's/qiconview\.h/tqiconview\.h/g' \
-e 's/qimageformatplugin\.h/tqimageformatplugin\.h/g' \
-e 's/qimage\.h/tqimage\.h/g' \
-e 's/qinputcontextfactory\.h/tqinputcontextfactory\.h/g' \
-e 's/qinputcontext\.h/tqinputcontext\.h/g' \
-e 's/qinputcontextplugin\.h/tqinputcontextplugin\.h/g' \
-e 's/qinputdialog\.h/tqinputdialog\.h/g' \
-e 's/qintcache\.h/tqintcache\.h/g' \
-e 's/qintcach\.h/tqintcach\.h/g' \
-e 's/qintdict\.h/tqintdict\.h/g' \
-e 's/qinterlacestyle\.h/tqinterlacestyle\.h/g' \
-e 's/qiodev\.h/tqiodev\.h/g' \
-e 's/qiodevice\.h/tqiodevice\.h/g' \
-e 's/qjiscodec\.h/tqjiscodec\.h/g' \
-e 's/qjpegio\.h/tqjpegio\.h/g' \
-e 's/qjpunicode\.h/tqjpunicode\.h/g' \
-e 's/qkeycode\.h/tqkeycode\.h/g' \
-e 's/qkeysequence\.h/tqkeysequence\.h/g' \
-e 's/qlabel\.h/tqlabel\.h/g' \
-e 's/qlayout\.h/tqlayout\.h/g' \
-e 's/qlcdnumber\.h/tqlcdnumber\.h/g' \
-e 's/qlcdnum\.h/tqlcdnum\.h/g' \
-e 's/qlibrary\.h/tqlibrary\.h/g' \
-e 's/qlined\.h/tqlined\.h/g' \
-e 's/qlineedit\.h/tqlineedit\.h/g' \
-e 's/qlistbox\.h/tqlistbox\.h/g' \
-e 's/qlist\.h/tqlist\.h/g' \
-e 's/qlistview\.h/tqlistview\.h/g' \
-e 's/qlocale\.h/tqlocale\.h/g' \
-e 's/qlocalfs\.h/tqlocalfs\.h/g' \
-e 's/qmainwindow\.h/tqmainwindow\.h/g' \
-e 's/qmap\.h/tqmap\.h/g' \
-e 's/qmemarray\.h/tqmemarray\.h/g' \
-e 's/qmenubar\.h/tqmenubar\.h/g' \
-e 's/qmenudata\.h/tqmenudata\.h/g' \
-e 's/qmenudta\.h/tqmenudta\.h/g' \
-e 's/qmessagebox\.h/tqmessagebox\.h/g' \
-e 's/qmetaobject\.h/tqmetaobject\.h/g' \
-e 's/qmetaobj\.h/tqmetaobj\.h/g' \
-e 's/qmime\.h/tqmime\.h/g' \
-e 's/qmlined\.h/tqmlined\.h/g' \
-e 's/qmngio\.h/tqmngio\.h/g' \
-e 's/qmodules\.h/tqmodules\.h/g' \
-e 's/qmotifplusstyle\.h/tqmotifplusstyle\.h/g' \
-e 's/qmotifstyle\.h/tqmotifstyle\.h/g' \
-e 's/qmovie\.h/tqmovie\.h/g' \
-e 's/qmsgbox\.h/tqmsgbox\.h/g' \
-e 's/qmultilinedit\.h/tqmultilinedit\.h/g' \
-e 's/qmultilineedit\.h/tqmultilineedit\.h/g' \
-e 's/qmutex\.h/tqmutex\.h/g' \
-e 's/qnamespace\.h/tqnamespace\.h/g' \
-e 's/qnetwork\.h/tqnetwork\.h/g' \
-e 's/qnetworkprotocol\.h/tqnetworkprotocol\.h/g' \
-e 's/qnp\.h/tqnp\.h/g' \
-e 's/qobjcoll\.h/tqobjcoll\.h/g' \
-e 's/qobjdefs\.h/tqobjdefs\.h/g' \
-e 's/qobjectcleanuphandler\.h/tqobjectcleanuphandler\.h/g' \
-e 's/qobjectdefs\.h/tqobjectdefs\.h/g' \
-e 's/qobjectdict\.h/tqobjectdict\.h/g' \
-e 's/qobject\.h/tqobject\.h/g' \
-e 's/qobjectlist\.h/tqobjectlist\.h/g' \
-e 's/qpaintdc\.h/tqpaintdc\.h/g' \
-e 's/qpaintdevicedefs\.h/tqpaintdevicedefs\.h/g' \
-e 's/qpaintdevice\.h/tqpaintdevice\.h/g' \
-e 's/qpaintdevicemetrics\.h/tqpaintdevicemetrics\.h/g' \
-e 's/qpaintd\.h/tqpaintd\.h/g' \
-e 's/qpainter\.h/tqpainter\.h/g' \
-e 's/qpair\.h/tqpair\.h/g' \
-e 's/qpalette\.h/tqpalette\.h/g' \
-e 's/qpdevmet\.h/tqpdevmet\.h/g' \
-e 's/qpen\.h/tqpen\.h/g' \
-e 's/qpicture\.h/tqpicture\.h/g' \
-e 's/qpixmapcache\.h/tqpixmapcache\.h/g' \
-e 's/qpixmap\.h/tqpixmap\.h/g' \
-e 's/qplatinumstyle\.h/tqplatinumstyle\.h/g' \
-e 's/qpmcache\.h/tqpmcache\.h/g' \
-e 's/qpngio\.h/tqpngio\.h/g' \
-e 's/qpntarry\.h/tqpntarry\.h/g' \
-e 's/qpointarray\.h/tqpointarray\.h/g' \
-e 's/qpoint\.h/tqpoint\.h/g' \
-e 's/qpolygonscanner\.h/tqpolygonscanner\.h/g' \
-e 's/qpopmenu\.h/tqpopmenu\.h/g' \
-e 's/qpopupmenu\.h/tqpopupmenu\.h/g' \
-e 's/qprintdialog\.h/tqprintdialog\.h/g' \
-e 's/qprinter\.h/tqprinter\.h/g' \
-e 's/qprndlg\.h/tqprndlg\.h/g' \
-e 's/qprocess\.h/tqprocess\.h/g' \
-e 's/qprogbar\.h/tqprogbar\.h/g' \
-e 's/qprogdlg\.h/tqprogdlg\.h/g' \
-e 's/qprogressbar\.h/tqprogressbar\.h/g' \
-e 's/qprogressdialog\.h/tqprogressdialog\.h/g' \
-e 's/qpsprn\.h/tqpsprn\.h/g' \
-e 's/qptrcollection\.h/tqptrcollection\.h/g' \
-e 's/qptrdict\.h/tqptrdict\.h/g' \
-e 's/qptrlist\.h/tqptrlist\.h/g' \
-e 's/qptrqueue\.h/tqptrqueue\.h/g' \
-e 's/qptrstack\.h/tqptrstack\.h/g' \
-e 's/qptrvector\.h/tqptrvector\.h/g' \
-e 's/qpushbt\.h/tqpushbt\.h/g' \
-e 's/qpushbutton\.h/tqpushbutton\.h/g' \
-e 's/qqueue\.h/tqqueue\.h/g' \
-e 's/qradiobt\.h/tqradiobt\.h/g' \
-e 's/qradiobutton\.h/tqradiobutton\.h/g' \
-e 's/qrangecontrol\.h/tqrangecontrol\.h/g' \
-e 's/qrangect\.h/tqrangect\.h/g' \
-e 's/qrect\.h/tqrect\.h/g' \
-e 's/qregexp\.h/tqregexp\.h/g' \
-e 's/qregion\.h/tqregion\.h/g' \
-e 's/qrtlcodec\.h/tqrtlcodec\.h/g' \
-e 's/qscrbar\.h/tqscrbar\.h/g' \
-e 's/qscrollbar\.h/tqscrollbar\.h/g' \
-e 's/qscrollview\.h/tqscrollview\.h/g' \
-e 's/qsemaphore\.h/tqsemaphore\.h/g' \
-e 's/qsemimodal\.h/tqsemimodal\.h/g' \
-e 's/qserversocket\.h/tqserversocket\.h/g' \
-e 's/qsession\.h/tqsession\.h/g' \
-e 's/qsessionmanager\.h/tqsessionmanager\.h/g' \
-e 's/qsettings\.h/tqsettings\.h/g' \
-e 's/qsgistyle\.h/tqsgistyle\.h/g' \
-e 's/qshared\.h/tqshared\.h/g' \
-e 's/qsignal\.h/tqsignal\.h/g' \
-e 's/qsignalmapper\.h/tqsignalmapper\.h/g' \
-e 's/qsignalslotimp\.h/tqsignalslotimp\.h/g' \
-e 's/qsimplerichtext\.h/tqsimplerichtext\.h/g' \
-e 's/qsizegrip\.h/tqsizegrip\.h/g' \
-e 's/qsize\.h/tqsize\.h/g' \
-e 's/qsizepolicy\.h/tqsizepolicy\.h/g' \
-e 's/qsjiscodec\.h/tqsjiscodec\.h/g' \
-e 's/qslider\.h/tqslider\.h/g' \
-e 's/qsocketdevice\.h/tqsocketdevice\.h/g' \
-e 's/qsocket\.h/tqsocket\.h/g' \
-e 's/qsocketnotifier\.h/tqsocketnotifier\.h/g' \
-e 's/qsocknot\.h/tqsocknot\.h/g' \
-e 's/qsortedlist\.h/tqsortedlist\.h/g' \
-e 's/qsound\.h/tqsound\.h/g' \
-e 's/qspinbox\.h/tqspinbox\.h/g' \
-e 's/qsplashscreen\.h/tqsplashscreen\.h/g' \
-e 's/qsplitter\.h/tqsplitter\.h/g' \
-e 's/qsqlcursor\.h/tqsqlcursor\.h/g' \
-e 's/qsqldatabase\.h/tqsqldatabase\.h/g' \
-e 's/qsqldriver\.h/tqsqldriver\.h/g' \
-e 's/qsqldriverplugin\.h/tqsqldriverplugin\.h/g' \
-e 's/qsqleditorfactory\.h/tqsqleditorfactory\.h/g' \
-e 's/qsqlerror\.h/tqsqlerror\.h/g' \
-e 's/qsqlfield\.h/tqsqlfield\.h/g' \
-e 's/qsqlform\.h/tqsqlform\.h/g' \
-e 's/qsql\.h/tqsql\.h/g' \
-e 's/qsqlindex\.h/tqsqlindex\.h/g' \
-e 's/qsqlpropertymap\.h/tqsqlpropertymap\.h/g' \
-e 's/qsqlquery\.h/tqsqlquery\.h/g' \
-e 's/qsqlrecord\.h/tqsqlrecord\.h/g' \
-e 's/qsqlresult\.h/tqsqlresult\.h/g' \
-e 's/qsqlselectcursor\.h/tqsqlselectcursor\.h/g' \
-e 's/qstack\.h/tqstack\.h/g' \
-e 's/qstatusbar\.h/tqstatusbar\.h/g' \
-e 's/qstring\.h/tqstring\.h/g' \
-e 's/qstringlist\.h/tqstringlist\.h/g' \
-e 's/qstrlist\.h/tqstrlist\.h/g' \
-e 's/qstrvec\.h/tqstrvec\.h/g' \
-e 's/qstylefactory\.h/tqstylefactory\.h/g' \
-e 's/qstyle\.h/tqstyle\.h/g' \
-e 's/qstyleplugin\.h/tqstyleplugin\.h/g' \
-e 's/qstylesheet\.h/tqstylesheet\.h/g' \
-e 's/qsyntaxhighlighter\.h/tqsyntaxhighlighter\.h/g' \
-e 's/qtabbar\.h/tqtabbar\.h/g' \
-e 's/qtabdialog\.h/tqtabdialog\.h/g' \
-e 's/qtabdlg\.h/tqtabdlg\.h/g' \
-e 's/qtable\.h/tqtable\.h/g' \
-e 's/qtabwidget\.h/tqtabwidget\.h/g' \
-e 's/qtextbrowser\.h/tqtextbrowser\.h/g' \
-e 's/qtextcodecfactory\.h/tqtextcodecfactory\.h/g' \
-e 's/qtextcodec\.h/tqtextcodec\.h/g' \
-e 's/qtextcodecplugin\.h/tqtextcodecplugin\.h/g' \
-e 's/qtextedit\.h/tqtextedit\.h/g' \
-e 's/qtextstream\.h/tqtextstream\.h/g' \
-e 's/qtextview\.h/tqtextview\.h/g' \
-e 's/qt\.h/tqt\.h/g' \
-e 's/qthread\.h/tqthread\.h/g' \
-e 's/qthreadstorage\.h/tqthreadstorage\.h/g' \
-e 's/qtimer\.h/tqtimer\.h/g' \
-e 's/qtl\.h/tqtl\.h/g' \
-e 's/qtoolbar\.h/tqtoolbar\.h/g' \
-e 's/qtoolbox\.h/tqtoolbox\.h/g' \
-e 's/qtoolbutton\.h/tqtoolbutton\.h/g' \
-e 's/qtooltip\.h/tqtooltip\.h/g' \
-e 's/qtranslator\.h/tqtranslator\.h/g' \
-e 's/qtsciicodec\.h/tqtsciicodec\.h/g' \
-e 's/qtstream\.h/tqtstream\.h/g' \
-e 's/qurl\.h/tqurl\.h/g' \
-e 's/qurlinfo\.h/tqurlinfo\.h/g' \
-e 's/qurloperator\.h/tqurloperator\.h/g' \
-e 's/qutfcodec\.h/tqutfcodec\.h/g' \
-e 's/quuid\.h/tquuid\.h/g' \
-e 's/qvalidator\.h/tqvalidator\.h/g' \
-e 's/qvaluelist\.h/tqvaluelist\.h/g' \
-e 's/qvaluestack\.h/tqvaluestack\.h/g' \
-e 's/qvaluevector\.h/tqvaluevector\.h/g' \
-e 's/qvariant\.h/tqvariant\.h/g' \
-e 's/qvbox\.h/tqvbox\.h/g' \
-e 's/qvbuttongroup\.h/tqvbuttongroup\.h/g' \
-e 's/qvector\.h/tqvector\.h/g' \
-e 's/qvfbhdr\.h/tqvfbhdr\.h/g' \
-e 's/qvgroupbox\.h/tqvgroupbox\.h/g' \
-e 's/qwaitcondition\.h/tqwaitcondition\.h/g' \
-e 's/qwhatsthis\.h/tqwhatsthis\.h/g' \
-e 's/qwidcoll\.h/tqwidcoll\.h/g' \
-e 's/qwidgetfactory\.h/tqwidgetfactory\.h/g' \
-e 's/qwidget\.h/tqwidget\.h/g' \
-e 's/qwidgetintdict\.h/tqwidgetintdict\.h/g' \
-e 's/qwidgetlist\.h/tqwidgetlist\.h/g' \
-e 's/qwidgetplugin\.h/tqwidgetplugin\.h/g' \
-e 's/qwidgetstack\.h/tqwidgetstack\.h/g' \
-e 's/qwindefs\.h/tqwindefs\.h/g' \
-e 's/qwindowdefs\.h/tqwindowdefs\.h/g' \
-e 's/qwindowsstyle\.h/tqwindowsstyle\.h/g' \
-e 's/qwinexport\.h/tqwinexport\.h/g' \
-e 's/qwizard\.h/tqwizard\.h/g' \
-e 's/qwmatrix\.h/tqwmatrix\.h/g' \
-e 's/qworkspace\.h/tqworkspace\.h/g' \
-e 's/qxml\.h/tqxml\.h/g'

@ -1,162 +0,0 @@
#!/bin/sh
# default keywords
KEYWORDS="Name GenericName Comment Keywords Description ExtraNames X-TDE-Submenu"
# parse arguments
while [ $# -gt 0 ]; do
key="$1"
case $key in
-k*)
if [ "${1#-k}" = "" ]; then
KEYWORD="$2"
shift
else
KEYWORD=${1#-k}
fi
if [ "$KEYWORD" = "-" ]; then
KEYWORDS=""
else
KEYWORDS="$KEYWORDS $KEYWORD"
fi
;;
-o*)
if [ "${1#-o}" = "" ]; then
POT="$2"
shift
else
POT=${1#-o}
fi
;;
*)
[ -f "$1" ] && \
D="${D}|$1"
;;
esac
shift
done
oldIFS=$IFS
IFS="|"
set -- ${D#|}
IFS=$oldIFS
if [ -z "$1" ]; then
echo "No desktop file specified for processing. Exiting..."
exit 1
fi
if [ -z "$KEYWORDS" ]; then
echo "No keywords specified to extract. Exiting..."
exit 1
fi
# determine path for translations
TRANSLATIONS_DIR="translations/desktop_files"
if [ -n "$(git rev-parse --git-dir 2>/dev/null)" ]; then
TRANSLATIONS_DIR="$(git rev-parse --show-toplevel)/${TRANSLATIONS_DIR}"
APPNAME=$(basename $(git rev-parse --show-toplevel))
fi
# determine POT name
if [ -z "$POT" ]; then
if [ $# -gt 1 ]; then
POT="$APPNAME-desktops"
else
POT="$(basename "$1")/"
fi
fi
if [ "${POT%/}" != "${POT}" ]; then
TRANSLATIONS_DIR="$TRANSLATIONS_DIR/${POT%/}"
POT=${POT%/}
fi
if [ "${POT%.pot}" = "${POT}" ]; then
POT=${POT}.pot
fi
[ -d "$TRANSLATIONS_DIR" ] || \
mkdir -p "$TRANSLATIONS_DIR"
# prepare keywords to match
KEYWORDS_MATCH="$(echo "$KEYWORDS" | sed -e "s|^ *||" -e "s| *$||" -e "s# \+#\\\\|#g" )"
# prepare desktop files for xgettext
unset DO
unset DX
while [ $# -gt 0 ]; do
D="$1"
shift
DO="$DO|$D.orig"
DX="$DX|$D.tde_l10n"
if [ ! -f "$D.orig" ]; then
(
printf "[<default>]\n"
cat "$D"
) > "$D.orig"
grep -v "^[a-zA-Z][^=]*\[[a-z][^=]*\]" "$D.orig" | \
grep -Fxv "[<default>]" > "$D"
fi
# xgettext for desktop files generates a reference to the source file
# one line below the actual position and does not have the option
# to use the variable name as a comment in the POT file.
# That's why we have our own mechanism for extracting strings.
sed \
-e "s|\"|\\\\\"|g" \
< "$D" | \
sed \
-e "s#^\($KEYWORDS_MATCH\)[ ]*=[ ]*\(.*\)#/*\1*/i18n(\"\2\");#;t" \
-e "s|.*||" \
> "$D.tde_l10n"
done
# extract strings
#xgettext --foreign-user -L Desktop -k -k"Name" -k"GenericName" -k"Comment" -k"Keywords" -k"Description" -k"ExtraNames" -k"X-TDE-Submenu" -o - "$D" | \
printf "%s" "${DX#|}" | tr "|" "\0" | xargs -r0 \
xgettext --foreign-user --from-code=UTF-8 -Cc -ki18n -o - | \
sed "s|\.tde_l10n||g" | \
sed "s|Content-Type: text/plain; charset=CHARSET|Content-Type: text/plain; charset=UTF-8|" | \
msguniq -o - \
> "$TRANSLATIONS_DIR/$POT"
POT_HEADER=$(sed -n "1,/^$/p" "$TRANSLATIONS_DIR/$POT")
# remove temporary files
printf "%s" "${DX#|}" | tr "|" "\0" | xargs -r0 \
rm
# process languages
printf "%s" "${DO#|}" | tr "|" "\0" | xargs -r0 cat |
sed -n "s|.*\[\([^]]*\)\][ ]*=.*|\1|p" | \
grep -vx "xx" | \
sort -u | \
while read L; do
printf "%s\n" "$POT_HEADER" | sed "s|\(Language: \)|\1$L|" > "$TRANSLATIONS_DIR/$L.po"
# process sections
printf "%s\n" "${DO#|}" | tr "|" "\n" |
while read D; do
sed -n "s|^\[\(.*\)\]$|\1|p" "$D" | \
sed -e 's|/|\\\\/|g' | \
while read S; do
# process variables
sed -n "/^\[$S\]/,/^\[/s|^\([^#\[][^\[]*\)\[$L\][ ]*=.*|\1|p" "$D" | \
while read V; do
MSGID=$(sed -n -e "s|\"|\\\\\"|g" \
-e "/^\[$S\]/,/^\[/s|^$V[ ]*=[ ]*\(.*\)$|msgid \"\1\"|p" "$D")
if [ -n "$MSGID" ] && [ -z "$(grep -Fx "$MSGID" "$TRANSLATIONS_DIR/$L.po")" ]; then
printf "%s\n" "$MSGID"
sed -n -e "s|\"|\\\\\"|g" -e "/^\[$S\]/,/^\[/s|^$V\[$L\][ ]*=[ ]*\(.*\)$|msgstr \"\1\"|p" "$D" | head -n1
printf "\n"
fi
done >> "$TRANSLATIONS_DIR/$L.po"
done
done
# update according to template
printf "%s" "-- $L "
msgmerge --update --backup=none "$TRANSLATIONS_DIR/$L.po" "$TRANSLATIONS_DIR/$POT"
done
# The LINGUAS file will be generated during build.
#ls "$TRANSLATIONS_DIR" | LANG=C sort | sed -n "s|\.po$||p" > "$TRANSLATIONS_DIR/LINGUAS"

@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# Set the current target version # Set the current target version
# The default is the version detected from TDE core header. export TARGET=${TARGET:-"14.0.3"}
export TARGET=${TARGET:-}
# When $SUFFIX = true then the package tarball name will be $package-trinity. # When $SUFFIX = true then the package tarball name will be $package-trinity.
# When $SUFFIX != true then the package tarball name will be trinity-$package. # When $SUFFIX != true then the package tarball name will be trinity-$package.
@ -12,14 +11,11 @@ export SUFFIX=${SUFFIX:-"true"}
# Setting base path for tarballs. Tarballs for indivitual modules # Setting base path for tarballs. Tarballs for indivitual modules
# will be created into folders in same structure, as is in 'tde'. # will be created into folders in same structure, as is in 'tde'.
# The default is 'tde-tarballs' in parent directory. # The default is 'tde-tarballs' in parent directory.
TARBALLS_BASE=${TARBALLS_BASE:-} TARBALLS_BASE=${TARBALLS_BASE:-"$(dirname $PWD)/tde-tarballs/$TARGET"}
# List of modules to be omitted during creating tarballs. # List of modules to be omitted during creating tarballs.
SKIP_MODULES=" SKIP_MODULES="
common/admin common
common/libltdl
common/libtdevnc
common/other
defaultsettins defaultsettins
experimental experimental
infrastructure infrastructure
@ -35,113 +31,27 @@ skip_module() {
return 1 return 1
} }
# echo in bold # Check git-dir
echobd () { if [[ ! -e .git ]] ||
if [ -p /dev/stdout ]; then [[ -z "`git rev-parse --git-dir 2>/dev/null`" ]]; then
echo "$1" echo "This script can only be run from a top level git directory. Exiting..."
else
echo -ne "\033[1m"
echo -n "$1"
echo -e "\033[0m"
fi
}
# Move to main tde folder
REMOTE_URL=$(git config --get remote.origin.url 2>/dev/null)
if [ "$REMOTE_URL" != "${REMOTE_URL%/tde-packaging}" ]; then
# Switch from tde-packaging into main tde folder
cd `git rev-parse --show-toplevel`
cd ../tde
REMOTE_URL=$(git config --get remote.origin.url 2>/dev/null)
fi
while [ -n "$REMOTE_URL" ] && [ "$REMOTE_URL" = "${REMOTE_URL%/tde}" ]; do
# Switch from submodule to parent
cd `git rev-parse --show-toplevel`
cd ..
REMOTE_URL=$(git config --get remote.origin.url 2>/dev/null)
done
if [ "$REMOTE_URL" = "${REMOTE_URL%/tde}" ]; then
# Main tde folder not found
echo "This script can only be run from TDE git directory. Exiting."
exit 1 exit 1
fi fi
cd `git rev-parse --show-toplevel`
# Check remote branch # Check remote branch
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` branch=`git branch --contains HEAD | grep -v "no branch" | head -n1 | cut -c 3-`
if [[ -z "$branch" ]]; then
branch_detached=`git branch --contains HEAD | egrep "^\* \(HEAD detached at" | head -n1 | sed "s|^\* (HEAD detached at \([^)]*\)).*$|\1|"`
branch=`git tag | grep -Fx "${branch_detached}"`
fi
if [[ -z "$branch" ]]; then
branch=`git branch -r --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-`
branch=${branch#origin/}
fi
if [[ -z "$branch" ]] || if [[ -z "$branch" ]] ||
( [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]] && [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
[[ -z "`git tag | grep -Fx \"${branch}\"`" ]] ); then echo "There is not active upstream branch. Exiting..."
echo "There is not active upstream branch. Exiting."
exit 1
fi
# Set target version
if [ -z "$TARGET" ]; then
if [ -f main/dependencies/tde-cmake/modules/TDEVersion.cmake ]; then
tdeversionHeader=main/dependencies/tde-cmake/modules/TDEVersion.cmake
elif [ -f main/core/tdelibs/tdecore/tdeversion.h ]; then
tdeversionHeader=main/core/tdelibs/tdecore/tdeversion.h
elif [ -f main/core/tdelibs/kdecore/kdeversion.h ]; then
tdeversionHeader=main/core/tdelibs/kdecore/kdeversion.h
elif [ -f main/tdelibs/tdecore/tdeversion.h ]; then
tdeversionHeader=main/tdelibs/tdecore/tdeversion.h
elif [ -f main/tdelibs/kdecore/kdeversion.h ]; then
tdeversionHeader=main/tdelibs/kdecore/kdeversion.h
fi
if [ -z "$tdeversionHeader" ]; then
echo "Cannot find TDE core headers. Exiting."
exit 1 exit 1
fi
TARGET=`sed -n 's/^[ \t]*\(set( DEFAULT_VERSION\|#define [KT]DE_VERSION_STRING\) "[^0-9]\?\([^ ~"]*\).*/\2/p' $tdeversionHeader`
fi fi
export TARGET
# Check branch by target
if [ "$TARGET" != "${TARGET#3.5.}" ]; then
if [ "$TARGET" != "${TARGET#3.5.13.}" ]; then
targetBranch=v3.5.13-sru
else
targetBranch=master
fi
if [ "$branch" = "v${TARGET}" ]; then
targetBranch=v${TARGET}
fi
else
if [ "$TARGET" != "${TARGET%.0}" ]; then
targetBranch=master
else
targetBranch=r${TARGET%.*}.x
fi
if [ "$branch" = "r${TARGET}" ]; then
targetBranch=r${TARGET}
fi
fi
if [ "$branch" != "$targetBranch" ]; then
echo "Target $TARGET is not valid on $branch branch. Exiting."
exit 1
fi
# Setting base path for tarballs
TARBALLS_BASE=${TARBALLS_BASE:-"$(dirname $PWD)/tde-tarballs/$TARGET"}
# Create tarballs for submodules # Create tarballs for submodules
echobd "Create tarballs for $(basename "$PWD") $branch branch"
echobd "Working in $PWD"
if [[ -e .gitmodules ]]; then if [[ -e .gitmodules ]]; then
create_tarball=$(dirname $(readlink -f "$0"))/create_tarball create_tarball=$(dirname $(readlink -f "$0"))/create_tarball
sed -n "s|^\[submodule \"\([^\"]*\)\"\]$|\1|p" <.gitmodules | \ sed -n "s|^\[submodule \"\([^\"]*\)\"\]$|\1|p" <.gitmodules | \
while read submodule; do while read submodule; do
skip_module "$submodule" && continue skip_module "$submodule" && continue
echobd "Module ${submodule}"
if [[ ! -e "$submodule/.git" ]]; then if [[ ! -e "$submodule/.git" ]]; then
git submodule init -- "$submodule" git submodule init -- "$submodule"
git submodule update -- "$submodule" git submodule update -- "$submodule"
@ -153,4 +63,3 @@ if [[ -e .gitmodules ]]; then
(cd "$submodule" && "$create_tarball") (cd "$submodule" && "$create_tarball")
done done
fi fi
echobd "Done in $PWD"

@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# Set the current target version # Set the current target version
# The default is the version detected from TDE core header. TARGET=${TARGET:-"14.0.3"}
TARGET=${TARGET:-}
# When $SUFFIX = true then the package tarball name will be $package-trinity. # When $SUFFIX = true then the package tarball name will be $package-trinity.
# When $SUFFIX != true then the package tarball name will be trinity-$package. # When $SUFFIX != true then the package tarball name will be trinity-$package.
@ -15,9 +14,9 @@ TARBALL_DIR=${TARBALL_DIR:-".."}
# Set compression method # Set compression method
case ${COMPRESS:="xz"} in case ${COMPRESS:="xz"} in
"gzip"*|"pigz"*) TAR_SUFFIX=".gz";; "gzip"|"pigz") TAR_SUFFIX="gz";;
"bzip2"|"pbzip2") TAR_SUFFIX=".bz2";; "bzip2"|"pbzip2") TAR_SUFFIX="bz2";;
"xz"|"pxz") TAR_SUFFIX=".xz";; "xz"|"pxz") TAR_SUFFIX="xz";;
esac esac
# Check git-dir # Check git-dir
@ -28,81 +27,10 @@ if [[ ! -e .git ]] ||
fi fi
# Check remote branch # Check remote branch
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` branch=`git branch --contains HEAD | grep -v "no branch" | head -n1 | cut -c 3-`
if [[ -z "$branch" ]]; then
branch_detached=`git branch --contains HEAD | egrep "^\* \(HEAD detached at" | head -n1 | sed "s|^\* (HEAD detached at \([^)]*\)).*$|\1|"`
branch=`git tag | grep -Fx "${branch_detached}"`
fi
if [[ -z "$branch" ]]; then
branch=`git branch -r --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-`
branch=${branch#origin/}
fi
if [[ -z "$branch" ]] || if [[ -z "$branch" ]] ||
( [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]] && [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
[[ -z "`git tag | grep -Fx \"${branch}\"`" ]] ); then echo "There is not active upstream branch. Exiting..."
echo "There is not active upstream branch. Exiting."
exit 1
fi
# Get submodule name
REMOTE_URL=$(git config --get remote.origin.url)
if [ "$REMOTE_URL" = "${REMOTE_URL%/tde}" ]; then
TDEROOT=$( cd `git rev-parse --show-toplevel` &&
cd .. &&
cd `git rev-parse --show-toplevel` &&
pwd )
SUBROOT=$( cd `git rev-parse --show-toplevel` &&
pwd )
elif [ -f .gitignore ]; then
TDEROOT=$( cd `git rev-parse --show-toplevel` &&
pwd )
SUBROOT=$PWD
METAPACKAGE=true
fi
MODULE=${SUBROOT#$TDEROOT/main/}
# Set target version
if [ -z "$TARGET" ]; then
if [ -f $TDEROOT/main/dependencies/tde-cmake/modules/TDEVersion.cmake ]; then
tdeversionHeader=$TDEROOT/main/dependencies/tde-cmake/modules/TDEVersion.cmake
elif [ -f $TDEROOT/main/core/tdelibs/tdecore/tdeversion.h ]; then
tdeversionHeader=$TDEROOT/main/core/tdelibs/tdecore/tdeversion.h
elif [ -f $TDEROOT/main/core/tdelibs/kdecore/kdeversion.h ]; then
tdeversionHeader=$TDEROOT/main/core/tdelibs/kdecore/kdeversion.h
elif [ -f $TDEROOT/main/tdelibs/tdecore/tdeversion.h ]; then
tdeversionHeader=$TDEROOT/main/tdelibs/tdecore/tdeversion.h
elif [ -f $TDEROOT/main/tdelibs/kdecore/kdeversion.h ]; then
tdeversionHeader=$TDEROOT/main/tdelibs/kdecore/kdeversion.h
fi
if [ -z "$tdeversionHeader" ]; then
echo "Cannot find TDE core headers. Exiting."
exit 1
fi
TARGET=`sed -n 's/^[ \t]*\(set( DEFAULT_VERSION\|#define [KT]DE_VERSION_STRING\) "[^0-9]\?\([^ ~"]*\).*/\2/p' $tdeversionHeader`
fi
# Check branch by target
if [ "$TARGET" != "${TARGET#3.5.}" ]; then
if [ "$TARGET" != "${TARGET#3.5.13.}" ]; then
targetBranch=v3.5.13-sru
else
targetBranch=master
fi
if [ "$branch" = "v${TARGET}" ]; then
targetBranch=v${TARGET}
fi
else
if [ "$TARGET" != "${TARGET%.0}" ]; then
targetBranch=master
else
targetBranch=r${TARGET%.*}.x
fi
if [ "$branch" = "r${TARGET}" ]; then
targetBranch=r${TARGET}
fi
fi
if [ "$branch" != "$targetBranch" ]; then
echo "Target $TARGET is not valid on $branch branch. Exiting."
exit 1 exit 1
fi fi
@ -139,53 +67,53 @@ if [[ -n "$target_tag" ]] && \
exit 1 exit 1
fi fi
# Get submodule name
REMOTE_URL=$(git config --get remote.origin.url)
if [ "$REMOTE_URL" = "${REMOTE_URL%/tde}" ]; then
TDEROOT=$( cd `git rev-parse --show-toplevel` &&
cd .. &&
cd `git rev-parse --show-toplevel` &&
pwd )
SUBROOT=$( cd `git rev-parse --show-toplevel` &&
pwd )
elif [ -f .gitignore ]; then
TDEROOT=$( cd `git rev-parse --show-toplevel` &&
pwd )
SUBROOT=$PWD
METAPACKAGE=true
fi
MODULE=${SUBROOT#$TDEROOT/main/}
# Calculate version # Calculate version
if [[ -z "$target_tag" ]]; then tag=`git tag | \
tag=`git tag | \
sed "s|^\([^0-9]\)|\1.|" | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr -k 5,5nr | sed "s|^\([^0-9]\)\.|\1|" | \ sed "s|^\([^0-9]\)|\1.|" | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr -k 5,5nr | sed "s|^\([^0-9]\)\.|\1|" | \
while read t; do \ while read t; do \
git branch --contains $t | cut -c 3- | grep -x "$branch" >/dev/null && \ git branch --contains $t | cut -c 3- | grep -x "$branch" >/dev/null && \
echo "$t..HEAD" && break; done` echo "$t..HEAD" && break; done`
else
tag="$target_tag..HEAD"
fi
count=`git log $tag --pretty=oneline | wc -l` count=`git log $tag --pretty=oneline | wc -l`
pkgver=$TARGET
if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
pkgver=$pkgver~pre$count+$(git rev-parse HEAD | cut -c 1-8)
fi
if [ "$SUFFIX" = "true" ]; then if [ "$SUFFIX" = "true" ]; then
package=$(basename $PWD)-trinity-$pkgver package=$(basename $PWD)-trinity-$TARGET
else else
package=trinity-$(basename $PWD)-$pkgver package=trinity-$(basename $PWD)-$TARGET
fi
if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
package=$package~pre$count+$(git rev-parse HEAD | cut -c 1-8)
fi fi
# Create tarball # Create tarball
echo "Package name: $package" echo "Package name: $package"
if [ ! -e $TARBALL_DIR/$package.tar$TAR_SUFFIX ]; then if [ ! -e $TARBALL_DIR/$package.tar.$TAR_SUFFIX ]; then
echo "Creating tarball in $TARBALL_DIR." echo "Creating tarball in $TARBALL_DIR."
echo "# TDE SCM module information" > .tdescminfo echo $MODULE > .tdescmmodule
echo "Name: $MODULE" >> .tdescminfo echo $branch-$(git rev-parse HEAD) > .tdescmrevision
echo "Version: R$pkgver" >> .tdescminfo trap "rm $TARBALL_DIR/tar-$$; rm .tdescmmodule .tdescmrevision; exit 1" INT
echo "Revision: $branch-$(git rev-parse HEAD)" >> .tdescminfo tar c --owner=root --group=users --exclude .git --exclude .gitmodules --transform "s|^\.\(/\|$\)|$package\1|" ./ | \
date +"DateTime: %m/%d/%Y %H:%M" -u -d "@$(git log -1 --pretty=format:"%ct")" >> .tdescminfo
trap "rm $TARBALL_DIR/tar-$$; rm .tdescminfo; exit 1" INT
find ./ | LC_ALL=C sort | \
egrep -v '(^|/)(\.git|\.gitmodules)(/|$)' | tr "\n" "\0" | \
tar c --no-recursion --null -T - \
--mode=u+rw,go=rX,a-s \
--owner=root --group=users \
--mtime "@$(git log -1 --pretty=format:"%ct")" \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
--transform "s|^\.\(/\|$\)|$package\1|" | \
$COMPRESS -9 >$TARBALL_DIR/tar-$$ && \ $COMPRESS -9 >$TARBALL_DIR/tar-$$ && \
mv $TARBALL_DIR/tar-$$ $TARBALL_DIR/$package.tar$TAR_SUFFIX || \ mv $TARBALL_DIR/tar-$$ $TARBALL_DIR/$package.tar.$TAR_SUFFIX || \
rm $TARBALL_DIR/tar-$$ rm $TARBALL_DIR/tar-$$
rm .tdescminfo rm .tdescmmodule .tdescmrevision
[ -f $TARBALL_DIR/$package.tar$TAR_SUFFIX ] && \
touch -d "@$(git log -1 --pretty=format:"%ct")" $TARBALL_DIR/$package.tar$TAR_SUFFIX
else else
echo "Unchanged tarball in $TARBALL_DIR." echo "Unchanged tarball in $TARBALL_DIR."
exit 2 exit 2

@ -1,94 +0,0 @@
#!/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" \

@ -1,59 +0,0 @@
#!/bin/bash
#
# This script replaces <includehints> in TQt designer UI files
# with global <include>'s, removing duplicate includes.
#
# The reasons for this is that includehints are not well supported
# and can cause FTBFS.
#
# Copyright (C) 2022 Mavridis Philippe <mavridisf@gmail.com>
# for the Trinity Desktop Project
#
# Licensed under GNU GPLv2 or later.
#
# Find files needing update
TO_REPLACE=$(find * -name \*.ui -exec grep -l includehint '{}' \;)
if [[ ${#TO_REPLACE} == 0 ]]
then
echo "No files need to be modified."
exit 0
fi
echo "Files that will be modified:"
for f in $TO_REPLACE
do
echo " - $f"
done
echo
echo "Press any key to continue to ^C to cancel."
read
# Start replacing
declare -a headers
for f in $TO_REPLACE
do
echo "Updating file '$f'..."
# Replace containing tag
sed -Ei 's!<(\/?)includehints>!<\1includes>!g' $f
# Replace includes themselves while avoiding duplicates (a simple
# sed -Ei 's/<includehint>([[:alnum:]\/.]*)</includehint>/<include location="global" impldecl="in implementation">\1</include>/g' $f
# would leave duplicates behind).
headers=()
for h in $(grep -o "<includehint>[[:alnum:]\/.]*</includehint>" $f | sed -E 's/<\/?includehint>//g')
do
if [[ ! "${headers[*]}" =~ $h ]] # if this is a unique header
then
echo " - $h"
sed -i "0,/<includehint>$h<\/includehint>/{s//<include location=\"global\" impldecl=\"in implementation\">$h<\/include>/}" $f
headers+=($h)
fi
done
# Remove leftover duplicate includehints
sed -Ei '/<includehint>([[:alnum:]\/.]*)<\/includehint>/d' $f
done

@ -1,41 +1,26 @@
#!/bin/bash #!/bin/bash
# echo in bold if [[ ! -e .git ]] ||
echobd () {
if [ -p /dev/stdout ]; then
echo "$1"
else
echo -ne "\033[1m"
echo -n "$1"
echo -e "\033[0m"
fi
}
# verify git directory and branch
if [[ ! -e .git ]] &&
[[ -z "`git rev-parse --git-dir 2>/dev/null`" ]]; then [[ -z "`git rev-parse --git-dir 2>/dev/null`" ]]; then
echo "Current directory does not contain a .git folder. Exiting..." echo "This script can only be run from a top level git directory. Exiting..."
exit 1 exit 1
fi fi
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"`
if [[ -z "$branch" ]]; then if [[ -z "$branch" ]] ||
branch=`git branch --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-` [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
fi echo "There is not active upstream branch. Exiting..."
if [[ -z "$branch" ]]; then
echo "There is not active branch. Exiting..."
exit 1 exit 1
fi fi
remote=`git config branch."$branch".remote`
if [[ -z "$remote" ]]; then # check git abilities
echo "Active branch is not remote tracked. Exiting..." if [[ -n "`git status --help 2>/dev/null|grep -- '--ignore-submodules'`" ]]; then
exit 1 GIT_IGNORE_SUBMODULES="--ignore-submodules"
fi fi
# get git user echo "Preparing $PWD for development use"
echobd "Preparing $(git rev-parse --show-toplevel | xargs -r basename) on $branch branch for development use"
if [[ $1 == "" ]]; then if [[ $1 == "" ]]; then
gituser=`git config --local remote.$remote.url | sed -n "s|\(https\?://\)\?\([^@]*\)@.*|\2|p" | grep -v "\(anonymous\|system\)"` gituser=`sed -n "/^\[remote \"origin\"\]/,/url/s/\turl = http:\/\/\([^@]*\)@.*/\1/p" <\`git rev-parse --git-dir\`/config | grep -v "\(anonymous\|system\)"`
else else
gituser=$1 gituser=$1
fi fi
@ -48,123 +33,41 @@ if [[ $gituser == "" ]]; then
gituser="anonymous" gituser="anonymous"
fi fi
if [[ -n "$(git config --get user.signingkey)" ]]; then THISSCRIPT=$(readlink -f $0)
GIT_SIGN="-S"
fi
# check git abilities if [[ ! -e "$THISSCRIPT" ]]; then
if [[ -n "`git status --help 2>/dev/null|grep -- '--ignore-submodules'`" ]]; then echo "Unable to find myself! Exiting..."
GIT_IGNORE_SUBMODULES="--ignore-submodules" exit 1
fi
if [[ -n "`git pull --help |grep -- '--\[no-\]recurse-submodules'`" ]]; then
GIT_NO_RECURSE_SUBMODULES="--no-recurse-submodules"
fi fi
# update module and submodules if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
updateModule() {
local MODULE
local REPO_URL
local REPO_PROTO
local REPO_MODULE
local REPO_WORKTREE
if [[ "$1" != "" ]]; then
MODULE=$1/
else
MODULE=""
fi
cd $PARENTDIR/$MODULE
if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
git reset --hard HEAD git reset --hard HEAD
git clean -dxff git clean -dxff
fi fi
git remote | git pull --rebase
while read REMOTE; do if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
REPO_URL=$(git config remote."$REMOTE".url)
REPO_SERVER=$(echo "$REPO_URL" |
sed -n "s|^http[^/]*/*\([^@]*@\)\?\([^/]*\)/.*|\2|p")
if [ -x /usr/bin/curl ] && [ "${REPO_URL}" != "${REPO_URL#http}" ]; then
curl --silent --connect-timeout 10 --max-time 15 --location --netrc \
$REPO_URL/info/refs?service=git-upload-pack >/dev/null || continue
elif [ -x /usr/bin/fping ] && [ -n "$REPO_SERVER" ]; then
fping -q -r1 "$REPO_SERVER" || continue
fi
echo Fetching $REMOTE
git fetch $REMOTE --prune $GIT_NO_RECURSE_SUBMODULES
done
git branch | grep -x "* $branch" >/dev/null || \
git checkout $branch
remote=`git config branch."$branch".remote`
[[ -n "$remote" ]] || return
git rebase $GIT_SIGN $remote/$branch $branch
if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
git reset --hard HEAD git reset --hard HEAD
git clean -dxff git clean -dxff
fi fi
if [[ -e $PARENTDIR/$MODULE.gitmodules ]]; then if [[ -e .gitmodules ]]; then
if [[ $gituser == "anonymous" ]]; then if [[ $gituser == "anonymous" ]]; then
sed -i 's/system@//g' $PARENTDIR/$MODULE.gitmodules sed -i 's/system@//g' .gitmodules
else else
sed -i "s/system@/$gituser@/g" $PARENTDIR/$MODULE.gitmodules sed -i "s/system@/$gituser@/g" .gitmodules
fi fi
REPO_URL=$(git config --get remote.$remote.url |\ REPO_URL=$(git config --get remote.origin.url |\
sed "s|\(https\?://\)\?\([^@]*@\)\?\(.*\)/[^/]*$|\3|") sed "s|\(https\?\)://\([^@]*@\)\?\(.*\)/[^/]*$|\3|")
REPO_PROTO=$(git config --get remote.$remote.url |\ REPO_PROTO=$(git config --get remote.origin.url |\
sed "s|\(https\?://\)\?\([^@]*@\)\?\(.*\)/[^/]*$|\1|") sed "s|\(https\?\)://\([^@]*@\)\?\(.*\)/[^/]*$|\1|")
REPO_MASTER=scm.trinitydesktop.org/scm/git REPO_MASTER=scm.trinitydesktop.org/scm/git
REPO_MODULE=$(git config --get remote.$remote.url |\
sed -e "s|\(https\?://\)\?\([^@]*@\)\?\(.*\)/\([^/]*\)$|\4|" -e "s|\.git$||")
REPO_GITDIR=$(git rev-parse --git-dir)
if [[ "${REPO_GITDIR/worktrees//}" != "$REPO_GITDIR" ]]; then
REPO_WORKTREE=${REPO_GITDIR%/[^/]*/worktrees/[^/]*}
fi
if [[ "$REPO_URL" != "$REPO_MASTER" ]]; then if [[ "$REPO_URL" != "$REPO_MASTER" ]]; then
sed -i "s#https\?://\([^@]*@\)\?$REPO_MASTER#$REPO_PROTO\1$REPO_URL#g" $PARENTDIR/$MODULE.gitmodules sed -i "s#https\?://\([^@]*@\)\?$REPO_MASTER#$REPO_PROTO://\1$REPO_URL#g" .gitmodules
fi
sed -n "s|^\[submodule \"\([^\"]*\)\"\]$|\1|p" <$PARENTDIR/$MODULE.gitmodules |\
while read submodule; do
echobd "Attempting to switch submodule ${MODULE}${submodule}"
cd $PARENTDIR/$MODULE
if [[ -n "$REPO_WORKTREE" ]] && [[ ! -e "$submodule/.git" ]]; then
REPO_LOCALTREE=$(git config --file .gitmodules --get submodule.$submodule.url | \
sed "s#^\(https\?://\)\?\([^@]*@\)\?$REPO_URL#$REPO_WORKTREE#g")
if [[ ! -d "$REPO_LOCALTREE" ]]; then
REPO_LOCALTREE=$REPO_LOCALTREE.git
fi
if [[ ! -d "$REPO_LOCALTREE" ]]; then
git clone --bare --config "remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*" \
"$(git config --file .gitmodules --get submodule.$submodule.url)" "$REPO_LOCALTREE"
fi fi
if [[ "$REPO_MODULE" != "tde" ]]; then
git config --file .gitmodules submodule.$submodule.url "$REPO_LOCALTREE"
else
(
cd $REPO_LOCALTREE &&
git fetch &&
git worktree prune &&
git worktree add $PARENTDIR/$MODULE$submodule origin/$branch &&
cd $PARENTDIR/$MODULE$submodule &&
git checkout $branch &&
git branch --set-upstream-to=origin/$branch
) || continue
fi
fi
if [[ -z "`git config --get submodule.$submodule.url`" ]]; then
git submodule init -- $submodule
fi
if [[ ! -e "$submodule/.git" ]]; then
git submodule update -- $submodule
fi
updateModule ${MODULE}${submodule}
done
git checkout -- $PARENTDIR/$MODULE.gitmodules
fi
}
# Update from top module git submodule init
cd `git rev-parse --show-toplevel` git submodule update
PARENTDIR=$PWD git submodule foreach "git checkout $branch && $THISSCRIPT $gituser"
echobd "Working in $PARENTDIR"
updateModule git checkout -- .gitmodules
echobd "Done in $PARENTDIR" fi

@ -1,122 +1,75 @@
#!/bin/bash #!/bin/bash
# echo in bold if [[ -e /var/lock/update-tde-git-submodules ]]; then
echobd () { echo "TDE GIT submodules are currently being updated"
if [ -p /dev/stdout ]; then echo "If this is not the case, please remove the lockfile /var/lock/update-tde-git-submodules"
echo "$1" exit 0
else fi
echo -ne "\033[1m"
echo -n "$1"
echo -e "\033[0m"
fi
}
# verify git directory and branch if [[ ! -e .git ]] ||
if [[ ! -e .git ]] &&
[[ -z "`git rev-parse --git-dir 2>/dev/null`" ]]; then [[ -z "`git rev-parse --git-dir 2>/dev/null`" ]]; then
echo "Current directory does not contain a .git folder. Exiting..." echo "Current directory does not contain a .git folder. Exiting..."
exit 1 exit 1
fi fi
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"`
if [[ -z "$branch" ]]; then
branch=`git branch --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-`
fi
if [[ -z "$branch" ]] || if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..." echo "There is not active upstream branch. Exiting..."
exit 1 exit 1
fi fi
# get git user
GITUSER="Automated System <$(git config --get user.email)>"
# check git abilities # check git abilities
if [[ -n "`git status --help 2>/dev/null|grep -- '--ignore-submodules'`" ]]; then if [[ -n "`git status --help 2>/dev/null|grep -- '--ignore-submodules'`" ]]; then
GIT_IGNORE_SUBMODULES="--ignore-submodules" GIT_IGNORE_SUBMODULES="--ignore-submodules"
fi fi
if [[ -n "`git pull --help |grep -- '--\[no-\]recurse-submodules'`" ]]; then
GIT_NO_RECURSE_SUBMODULES="--no-recurse-submodules"
fi
# commmit changed module touch /var/lock/update-tde-git-submodules
commitModule() {
if [[ "$1" == "" ]]; then
return
fi
local MODULE=$1
cd $PARENTDIR/$MODULE/.. PARENTDIR=$PWD
cd `git rev-parse --show-toplevel` echo "Working in $PARENTDIR"
if [[ ! -z "`git status --porcelain $PARENTDIR/$MODULE`" ]]; then git pull
echo "Committing changes to $PWD" if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
git add $PARENTDIR/$MODULE git reset --hard HEAD
git commit $PARENTDIR/$MODULE --author "$GITUSER" -m "Reset submodule $MODULE to latest HEAD" git clean -dxff
fi fi
if [[ "`git rev-parse HEAD`" != "`git rev-parse origin/$branch`" ]]; then
echo "Push changes for $PWD"
git pull --rebase $GIT_NO_RECURSE_SUBMODULES
git push origin HEAD
fi
}
# update module and submodules exec 3< submodules
updateModule() { while read <&3
local MODULE do
if [[ "$1" != "" ]]; then cd $PARENTDIR
MODULE=$1/ DIR2UPDATE=$REPLY
else if [[ $DIR2UPDATE != "" ]]; then
MODULE="" echo "Attempting to reset submodule $DIR2UPDATE"
cd $PARENTDIR/$DIR2UPDATE/..
cd `git rev-parse --show-toplevel`
if [[ -z "`grep \"^Updated: $PWD$\" /var/lock/update-tde-git-submodules`" ]]; then
echo "Updated: $PWD" >>/var/lock/update-tde-git-submodules
git submodule init
git submodule update
fi fi
cd $PARENTDIR/$DIR2UPDATE
cd $PARENTDIR/$MODULE
if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
git reset --hard HEAD git reset --hard HEAD
git clean -dxff git clean -dxff
fi fi
if [[ "$1" != "" ]]; then
git checkout $branch git checkout $branch
git pull
cd ..
cd `git rev-parse --show-toplevel`
echo "Committing changes to $PWD"
if [[ ! -z "`git status --porcelain $PARENTDIR/$DIR2UPDATE`" ]]; then
git add $PARENTDIR/$DIR2UPDATE
git commit $PARENTDIR/$DIR2UPDATE -m "Reset submodule $DIR2UPDATE to latest HEAD"
fi fi
git pull --rebase $GIT_NO_RECURSE_SUBMODULES
if [[ "`git rev-parse HEAD`" != "`git rev-parse origin/$branch`" ]]; then if [[ "`git rev-parse HEAD`" != "`git rev-parse origin/$branch`" ]]; then
echo "Push changes for $PWD"
git push origin HEAD git push origin HEAD
fi fi
if [[ "$1" != "" ]]; then
commitModule $1
fi fi
done
exec 3>&-
if [[ -e $PARENTDIR/$MODULE.gitmodules ]]; then # Let the disk subsystem recover
sed -n "s|^\[submodule \"\([^\"]*\)\"\]$|\1|p" <$PARENTDIR/$MODULE.gitmodules |\ sleep 60
while read submodule; do
echobd "Attempting to reset submodule ${MODULE}${submodule}"
cd $PARENTDIR/$MODULE
if [[ -z "`git config --get submodule.$submodule.url`" ]]; then
git submodule init -- $submodule
fi
if [[ ! -e "$submodule/.git" ]]; then
git submodule update -- $submodule
fi
updateModule ${MODULE}${submodule}
done
if [[ "$1" != "" ]]; then
commitModule $1
fi
fi
}
# Update from top module rm /var/lock/update-tde-git-submodules
if [[ -e /var/lock/update-tde-git-submodules-$branch ]]; then
echo "TDE GIT submodules are currently being updated"
echo "If this is not the case, please remove the lockfile"
echo "/var/lock/update-tde-git-submodules-$branch"
exit 0
fi
touch /var/lock/update-tde-git-submodules-$branch
echobd "Updating submodules in $(git rev-parse --show-toplevel | xargs -r basename) $branch branch"
cd `git rev-parse --show-toplevel`
PARENTDIR=$PWD
echobd "Working in $PARENTDIR"
updateModule
echobd "Done in $PARENTDIR"
rm /var/lock/update-tde-git-submodules-$branch

Loading…
Cancel
Save