File: codelite_xterm

package info (click to toggle)
codelite 6.1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 48,992 kB
  • ctags: 43,502
  • sloc: cpp: 334,263; ansic: 18,441; xml: 4,713; yacc: 2,653; lex: 2,449; python: 1,188; sh: 385; makefile: 40
file content (23 lines) | stat: -rwxr-xr-x 710 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash 

## A wrapper script around the xterm utility 
## which allows codelite to export LD_LIBRARY_PATH into the exterm
## shell
program_title=$1

if [ "$program_title" = "" ]; then
	if [ "${LD_LIBRARY_PATH}" = "" ]; then
		## LD_LIBRARY_PATH is not defined OR empty
		## Run xterm without the bash wrapper
		x-terminal-emulator -T "codelite's shell" 2> /dev/null
	fi
else
	if [ "${LD_LIBRARY_PATH}" = "" ]; then
		## LD_LIBRARY_PATH is not defined OR empty
		## Run xterm without the bash wrapper
		x-terminal-emulator -T "$program_title" -e $2 2> /dev/null
	else
		x-terminal-emulator -T "$program_title" -e /bin/bash -c 'export LD_LIBRARY_PATH=$0;shift;$@' $LD_LIBRARY_PATH "$@" 2> /dev/null
	fi
fi