2017-08-31 18:42:19 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-08-30 06:32:59 +00:00
|
|
|
## Testing script for Emacs Lisp files on GNU/Linux and MacOS
|
2017-08-31 18:42:19 +00:00
|
|
|
##
|
|
|
|
## Copyright (c) 2012-2014 Sylvain Benner
|
2020-08-30 05:00:45 +00:00
|
|
|
## Copyright (c) 2014-2020 Sylvain Benner & Contributors
|
2017-08-31 18:42:19 +00:00
|
|
|
##
|
|
|
|
## Author: Eugene Yaremenko
|
|
|
|
## URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
##
|
|
|
|
## This file is not part of GNU Emacs.
|
|
|
|
##
|
|
|
|
## License: GPLv3
|
|
|
|
|
2020-08-30 05:00:45 +00:00
|
|
|
# realpath for OS X https://stackoverflow.com/a/3572105/1224362
|
|
|
|
abs_p() {
|
|
|
|
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
|
|
|
|
}
|
2017-08-31 18:42:19 +00:00
|
|
|
|
2020-08-30 23:27:56 +00:00
|
|
|
ln -s "$(pwd)" $HOME/.emacs.d
|
2020-08-30 05:00:45 +00:00
|
|
|
testdir=$(abs_p tests/$1)
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Running '$2' for '$1' in '$testdir' folder"
|
2017-08-31 18:42:19 +00:00
|
|
|
if [ -f $testdir/dotspacemacs.el ]; then
|
2020-09-01 16:14:02 +00:00
|
|
|
cp $testdir/dotspacemacs.el ~/.spacemacs
|
2017-08-31 18:42:19 +00:00
|
|
|
fi
|
|
|
|
cd $testdir && echo "Now in $(pwd)"
|
|
|
|
make $2
|
|
|
|
exit $?
|