dont use xargs for elisp if no args were passed

This commit is contained in:
Brian Seymour 2021-01-21 19:32:43 -06:00
parent 037dedd162
commit 8db0dc0b6d
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,8 @@
#!/bin/bash
cd /tmp/$2
timeout -s KILL 3 xargs -a args.args -d '\n' emacs -Q --script code.code < stdin.stdin
if [[ -z $(grep '[^[:space:]]' args.args) ]]; then
timeout -s KILL 3 emacs -Q --script code.code < stdin.stdin
else
timeout -s KILL 3 xargs -a args.args -d '\n' emacs -Q --script code.code < stdin.stdin
fi