emacs-ipython-notebook/tools/install-cask.sh
dickmao c424f2ae5a workaround for emacs-26.1 travis
Delete the org-plus-contrib dependency in Cask via a fast switcheroo
in install-cask.sh
2018-10-12 21:55:33 -05:00

41 lines
1 KiB
Bash

#!/bin/bash
# Install cask for Travis CI
# or if already installed, then check for updates
# Author: gonewest818 https://github.com/clojure-emacs/cider/pull/2139
set -x
WORKDIR=${HOME}/local
CASKDIR=$WORKDIR/cask
. tools/retry.sh
cask_upgrade_cask_or_reset() {
cask upgrade-cask || { rm -rf $HOME/.emacs.d/.cask && false; }
}
cask_install_or_reset() {
if [ $(cask eval "(princ emacs-major-version)") -gt "25" ]; then
echo "!!!! ALERT WORKAROUND !!!!"
set -x
grep -v "org-plus-contrib" ./Cask > ./Cask.tmp
mv ./Cask.tmp ./Cask
set +x
fi
cask install || { rm -rf .cask && false; }
}
# Bootstrap the cask tool and its dependencies
if [ -d $CASKDIR ]
then
travis_retry cask_upgrade_cask_or_reset
else
git clone https://github.com/cask/cask.git $CASKDIR
travis_retry cask_upgrade_cask_or_reset
fi
# Install dependencies for cider as descriped in ./Cask
# Effect is identical to "make elpa", but here we can retry
# in the event of network failures.
travis_retry cask_install_or_reset && touch elpa-emacs