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
|