aboutsummaryrefslogtreecommitdiff
path: root/emacs/test-startup.sh
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2016-10-21 11:55:32 +0200
committerMiquel Sabaté Solà <msabate@suse.com>2016-10-21 11:55:32 +0200
commited87ba72282a8e5c2cd3f5631748726c930809bd (patch)
tree7630ffdce6bcf1fdcda49ca04b3dc890e52d18ee /emacs/test-startup.sh
parente46f1d3dea4f7cda296628b81b174f6ed7a42032 (diff)
downloaddotfiles-ed87ba72282a8e5c2cd3f5631748726c930809bd.tar.gz
dotfiles-ed87ba72282a8e5c2cd3f5631748726c930809bd.zip
emacs: trying to test it with travis
Files and idea taken from https://github.com/purcell/emacs.d. I've also added the bin/test directory into it. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'emacs/test-startup.sh')
-rwxr-xr-xemacs/test-startup.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/emacs/test-startup.sh b/emacs/test-startup.sh
new file mode 100755
index 0000000..d8f3547
--- /dev/null
+++ b/emacs/test-startup.sh
@@ -0,0 +1,22 @@
+#!/bin/sh -ex
+# Kindly taken from: https://github.com/purcell/emacs.d
+
+if [ -n "$TRAVIS" ]; then
+ # We still need to have an .emacs.d directory, so emacs-async (dependency of
+ # some other package) is happy.
+ export HOME=$PWD/..
+ ln -s emacs ../.emacs.d
+fi
+
+echo "Attempting startup..."
+
+${EMACS:=emacs} -nw --batch \
+ --eval '(let ((debug-on-error t)
+ (url-show-status nil)
+ (user-emacs-directory default-directory)
+ (package-user-dir (expand-file-name (concat "elpa-" emacs-version)))
+ (custom-theme-directory default-directory)
+ (user-init-file (expand-file-name "init.el")))
+ (load-file user-init-file)
+ (run-hooks (quote after-init-hook)))'
+echo "Startup successful"