diff options
author | Ryan Kavanagh <rak@rak.ac> | 2021-12-13 16:55:42 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2021-12-13 16:58:10 -0500 |
commit | e5dfb045b994e1ab8fef9ef5d3f02ce20ea6b685 (patch) | |
tree | ba74287d80e46c70dab8c4311a1dc933fbfbdea1 /dot_vim/c-support/scripts/wrapper.sh | |
parent | fix pager again (diff) |
many more renames
Diffstat (limited to 'dot_vim/c-support/scripts/wrapper.sh')
-rw-r--r-- | dot_vim/c-support/scripts/wrapper.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dot_vim/c-support/scripts/wrapper.sh b/dot_vim/c-support/scripts/wrapper.sh new file mode 100644 index 0000000..55d9961 --- /dev/null +++ b/dot_vim/c-support/scripts/wrapper.sh @@ -0,0 +1,34 @@ +#!/bin/bash +#=============================================================================== +# FILE: wrapper.sh +# USAGE: ./wrapper.sh executable [cmd-line-args] +# DESCRIPTION: Wraps the execution of a programm or script. +# Use with xterm: xterm -e wrapper.sh executable cmd-line-args +# This script is used by several plugins: +# bash-support.vim, c.vim and perl-support.vim +# OPTIONS: --- +# REQUIREMENTS: which(1) - shows the full path of (shell) commands. +# BUGS: --- +# NOTES: --- +# AUTHOR: Dr.-Ing. Fritz Mehner (Mn), mehner@fh-swf.de +# COMPANY: Fachhochschule Südwestfalen, Iserlohn +# CREATED: 23.11.2004 18:04:01 CET +# REVISION: $Id: wrapper.sh,v 1.3 2007/10/03 09:06:09 mehner Exp $ +#=============================================================================== + +command=${@} # the complete command line +executable=${1} # name of the executable; may be quoted + +fullname=$(which $executable) +[ $? -eq 0 ] && executable=$fullname + +if [ ${#} -ge 1 ] && [ -x "$executable" ] +then + shift + "$executable" ${@} + echo -e "> \"${command}\" returned ${?}" +else + echo -e "\n !! file \"${executable}\" does not exist or is not executable !!" +fi +echo -e " ... press return key ... " +read dummy |