File: htags-client

package info (click to toggle)
global 6.6.14-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,612 kB
  • sloc: ansic: 132,180; sh: 5,017; javascript: 4,891; perl: 811; lisp: 676; makefile: 340; yacc: 122
file content (27 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#
# client program for gtags, global, htags
#
host=${GTAGSREMOTEHOST}
user=${GTAGSREMOTEUSER}
shell=${GTAGSREMOTESHELL-ssh}
cwd=${GTAGSREMOTECWD}	# for TRAMP support
case $host in
'')	echo "Remote host is not specified."
	exit 1;;
esac
case $cwd in
'')	cwd=`pwd`;;
esac
# Make command line.
command=`basename $0 | sed 's/-client//'`
arg=
for a in "$@"; do
	a=`echo "$a" | sed "s/'/'\"'\"'/g"`
	arg=$arg" '${a}'"
done
commandline="cd '$cwd' && $command $arg"
case $user in
'')	$shell -q $host $commandline;;
*)	$shell -q -l $user $host $commandline;;
esac