bin/homeinit: Only build latest Emacs if not on Guix

master
Pierre Neidhardt 2018-03-29 12:23:01 +05:30
parent 2eea27d1ba
commit b6831f2049
1 changed files with 30 additions and 27 deletions

View File

@ -89,34 +89,37 @@ lnn "$SOURCEDIR/bookmarks/quickmarks" "$XDG_CONFIG_HOME/qutebrowser/"
echo "==> 'projects' folder" echo "==> 'projects' folder"
mkdir -pv "$HOME/projects" mkdir -pv "$HOME/projects"
if ! command -v emacs >/dev/null 2>&1 || \ ## Only build latest Emacs if not on Guix.
if ! command -v guix >/dev/null 2>&1; then
if ! command -v emacs >/dev/null 2>&1 || \
[ $(emacs --quick --batch --eval '(message "%s" emacs-major-version)' 2>&1) -lt 26 ]; then [ $(emacs --quick --batch --eval '(message "%s" emacs-major-version)' 2>&1) -lt 26 ]; then
pushd "$HOME/projects" pushd "$HOME/projects"
git clone https://git.savannah.gnu.org/git/emacs.git git clone https://git.savannah.gnu.org/git/emacs.git
mkdir -p ../emacs-build mkdir -p ../emacs-build
cd ../emacs-build cd ../emacs-build
../emacs/configure \ ../emacs/configure \
--disable-gtk-deprecation-warnings \ --disable-gtk-deprecation-warnings \
--without-pop \ --without-pop \
--without-kerberos \ --without-kerberos \
--without-kerberos5 \ --without-kerberos5 \
--with-x-toolkit=gtk3 \ --with-x-toolkit=gtk3 \
--with-jpeg \ --with-jpeg \
--with-tiff \ --with-tiff \
--with-gif \ --with-gif \
--with-png \ --with-png \
--with-rsvg \ --with-rsvg \
--with-xml2 \ --with-xml2 \
--with-imagemagick \ --with-imagemagick \
--with-xft \ --with-xft \
--with-libotf \ --with-libotf \
--without-gsettings \ --without-gsettings \
--without-gconf \ --without-gconf \
--with-gnutls \ --with-gnutls \
--with-modules \ --with-modules \
--with-threads --with-threads
popd popd
sudo make install sudo make install
fi
fi fi
if command -v emacs >/dev/null 2>&1; then if command -v emacs >/dev/null 2>&1; then