18 lines
351 B
Bash
18 lines
351 B
Bash
|
#!/usr/bin/env bash
|
||
|
#
|
||
|
set -euo pipefail
|
||
|
IFS=$'\n\t'
|
||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||
|
|
||
|
INPUT_FILE="$1"
|
||
|
OUTPUT_FILE="$2"
|
||
|
|
||
|
INIT_SCRIPT=$(cat <<EOF
|
||
|
(progn
|
||
|
(org-mode)
|
||
|
(org-dump-ast "$OUTPUT_FILE")
|
||
|
)
|
||
|
EOF
|
||
|
)
|
||
|
exec emacs -q --no-site-file --no-splash --batch --load "$DIR/common.el" --insert "$INPUT_FILE" --eval "$INIT_SCRIPT"
|