From 898c379f4cf6ac2fac13135103d682bbef48f798 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Mon, 6 Jan 2014 03:01:39 +0100 Subject: Rename kdekillall -> tdekillall --- scripts/CMakeLists.txt | 2 +- scripts/Makefile.am | 2 +- scripts/README | 2 +- scripts/completions/zsh/_kdekillall | 8 -------- scripts/completions/zsh/_tdekillall | 8 ++++++++ scripts/kdekillall | 28 ---------------------------- scripts/tdekillall | 28 ++++++++++++++++++++++++++++ 7 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 scripts/completions/zsh/_kdekillall create mode 100644 scripts/completions/zsh/_tdekillall delete mode 100755 scripts/kdekillall create mode 100755 scripts/tdekillall diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index ed06d49d..17f9683c 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -19,7 +19,7 @@ install( PROGRAMS svnversions svnchangesince findmissingcrystal tdesvn-build kdedoc qtdoc extractrc extractattr zonetab2pot.py licensecheck fixkdeincludes fixuifiles includemocs cxxmetric extend_dmalloc - kdekillall kdelnk2desktop.py package_crystalsvg png2mng.pl + tdekillall kdelnk2desktop.py package_crystalsvg png2mng.pl kdemangen.pl DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 2f623d85..9a2f5f63 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -9,7 +9,7 @@ bin_SCRIPTS = \ svnchangesince findmissingcrystal tdesvn-build \ kdedoc qtdoc extractrc extractattr zonetab2pot.py \ licensecheck fixkdeincludes fixuifiles includemocs \ - cxxmetric extend_dmalloc kdekillall kdelnk2desktop.py \ + cxxmetric extend_dmalloc tdekillall kdelnk2desktop.py \ package_crystalsvg png2mng.pl kdemangen.pl # Install syntax highlighting file for KWrite/Kate. diff --git a/scripts/README b/scripts/README index fe31583f..5bbe3a7e 100644 --- a/scripts/README +++ b/scripts/README @@ -13,7 +13,7 @@ kDebug2kdDebug.sh Script to convert old KDE debugging statements to their extend_dmalloc Script to run gdb on return-addresses -kdekillall Kills the process "tdeinit: with signal +tdekillall Kills the process "tdeinit: with signal === PROGRAMMING SUPPORT diff --git a/scripts/completions/zsh/_kdekillall b/scripts/completions/zsh/_kdekillall deleted file mode 100644 index a51fb85d..00000000 --- a/scripts/completions/zsh/_kdekillall +++ /dev/null @@ -1,8 +0,0 @@ -#compdef kdekillall - -local progs -progs=(`ps x | grep tdeinit: | grep -v Running | grep -v grep | sed 's,.*tdeinit: ,,' | sed 's, .*,,'`) - -_alternative \ - 'Q_SIGNALS:: _Q_SIGNALS -p' \ - 'compadd $progs' diff --git a/scripts/completions/zsh/_tdekillall b/scripts/completions/zsh/_tdekillall new file mode 100644 index 00000000..bff071af --- /dev/null +++ b/scripts/completions/zsh/_tdekillall @@ -0,0 +1,8 @@ +#compdef tdekillall + +local progs +progs=(`ps x | grep tdeinit: | grep -v Running | grep -v grep | sed 's,.*tdeinit: ,,' | sed 's, .*,,'`) + +_alternative \ + 'Q_SIGNALS:: _Q_SIGNALS -p' \ + 'compadd $progs' diff --git a/scripts/kdekillall b/scripts/kdekillall deleted file mode 100755 index 69c39c4f..00000000 --- a/scripts/kdekillall +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh - -case $1 in - -*) signal=$1; shift;; -esac -if [ $# = 0 ]; then - echo "Usage: $0 [-] " - echo 'Kills the process "tdeinit: with signal "' - echo "if is not specified, it defaults to SIGTERM," - echo "see kill -l for a list of possible Q_SIGNALS" -else - list=$(ps auwx | grep $USER | awk "/[k]deinit: $1/ {print \$2}") - if test -z "$list"; then - # on newer Linux kernels (>= 2.6.10) KDE is able to use - # prctl(PR_SET_NAME) to change the process name... - list=$(ps auwx | grep $USER | awk "/\[tdeinit\] $1/ {print \$2}") - fi - if test -z "$list"; then - # with KDE 3.4 we changed the view again... - list=$(ps auwx | grep $USER | awk "/$1 \[tdeinit\]/ {print \$2}") - fi - if test -n "$list"; then - kill $signal $list - else - echo 'No process killed' - exit 1 - fi -fi diff --git a/scripts/tdekillall b/scripts/tdekillall new file mode 100755 index 00000000..ddf450de --- /dev/null +++ b/scripts/tdekillall @@ -0,0 +1,28 @@ +#! /bin/sh + +case $1 in + -*) signal=$1; shift;; +esac +if [ $# = 0 ]; then + echo "Usage: $0 [-] " + echo 'Kills the process "tdeinit: with signal "' + echo "if is not specified, it defaults to SIGTERM," + echo "see kill -l for a list of possible SIGNALS" +else + list=$(ps auwx | grep $USER | awk "/[k]deinit: $1/ {print \$2}") + if test -z "$list"; then + # on newer Linux kernels (>= 2.6.10) KDE is able to use + # prctl(PR_SET_NAME) to change the process name... + list=$(ps auwx | grep $USER | awk "/\[tdeinit\] $1/ {print \$2}") + fi + if test -z "$list"; then + # with KDE 3.4 we changed the view again... + list=$(ps auwx | grep $USER | awk "/$1 \[tdeinit\]/ {print \$2}") + fi + if test -n "$list"; then + kill $signal $list + else + echo 'No process killed' + exit 1 + fi +fi -- cgit v1.2.1