-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-config-batch.sh
More file actions
executable file
·37 lines (32 loc) · 1.02 KB
/
test-config-batch.sh
File metadata and controls
executable file
·37 lines (32 loc) · 1.02 KB
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
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -euo pipefail
TMPHOME="${TMPHOME:-}"
if [ -n "$TMPHOME" ]; then
if ! [ -d "$TMPHOME" ]; then
mkdir -p "$TMPHOME"
fi
else
TMPHOME="$(mktemp -d)"
fi
echo "Using '$TMPHOME' as temporary home directory"
mkdir -p "$TMPHOME/.emacs.d/"
rm -f "$TMPHOME/.emacs.d/config.el"{,c}
cp config.org init.el custom.el "$TMPHOME/.emacs.d/"
echo "Loading config for the 1st time"
HOME="$TMPHOME" \
emacs -batch \
--eval "(setq after-init-time nil)" \
--eval "(setq network-security-level 'low)" \
-f toggle-debug-on-error \
-l "~/.emacs.d/init.el" \
--eval "(wsi-simulate-idle-time 500)" \
--eval "(require 'ido-completing-read+)"
echo "Loading config for the 2nd time. It should not need to install any more packages."
HOME="$TMPHOME" \
emacs -batch \
--eval "(setq after-init-time nil)" \
--eval "(setq network-security-level 'low)" \
-f toggle-debug-on-error \
-l "~/.emacs.d/init.el" \
--eval "(wsi-simulate-idle-time 500)" \
--eval "(require 'ido-completing-read+)"