Commit 22f47abb authored by Mohcine Chraibi's avatar Mohcine Chraibi

install emacs25 and git if not existing

parent b9f6af8c
Pipeline #5967 passed with stage
in 9 seconds
#!/bin/bash
## each separate version number must be less than 3 digit wide !
function version { echo "$@" | gawk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; }
# install emacs25
# apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:kelleyk/emacs
sudo add-apt-repository -y ppa:git-core/ppa # update git for Magit
sudo apt-get update
sudo apt-get install -y emacs25 git
# install emacs25
if ! [ -x "$(command -v emacs25)" ]; then
echo "install emacs25"
sudo add-apt-repository -y ppa:kelleyk/emacs
sudo apt-get update
sudo apt-get install -y emacs25
fi
# install git
if ! [ -x "$(command -v git)" ]; then
echo "install git"
sudo add-apt-repository -y ppa:kelleyk/emacs
sudo apt-get update
sudo apt-get install -y git
fi
# check git version for magit!
git_version=`git --version | awk '{print $3}'`
if [ "$(version "$first_version")" -lt "$(version "1.2")" ]; then
echo "update git"
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
fi
sudo apt-get clean
orgfileDir="$HOME/Dropbox/Orgfiles"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment