genindex.sh: take optional project name to increase speed
[girocco.git] / toolbox / run-taskd.sh
blobcc985132714725bc4e23adaea6b5a2888772f262
1 #!/bin/sh
3 cd "$HOME"
5 exec_login_shell() {
6 # set arg 0 to have a leading '-' to force a login shell since
7 # the -l option is shell-specific. All shells must understand -i.
8 exec perl -e 'my $b=shift; exec $b @ARGV or die "Can\047t exec \"$b\": $!\n"' "$SHELL" "-$(basename "$SHELL")" -i
11 if [ "$1" = "--shell" ]; then
12 shift
13 trap 'trap - HUP INT QUIT PIPE TERM TSTP TTIN TTOU; exec_login_shell' EXIT
14 trap '' HUP INT QUIT PIPE TERM TSTP TTIN TTOU
16 trap - HUP INT QUIT PIPE TERM TSTP TTIN TTOU
17 perl -I@basedir@/taskd @basedir@/taskd/taskd.pl "$@"
19 exit
21 exec perl -I@basedir@/taskd @basedir@/taskd/taskd.pl "$@"