Commit 958ec070 authored by Mohcine Chraibi's avatar Mohcine Chraibi

some ifs when installing

parent 32cca049
Pipeline #5961 passed with stage
in 5 seconds
......@@ -8,27 +8,42 @@ sudo apt-get update
sudo apt-get install -y emacs25 git
sudo apt-get clean
# directory for orgfiles
echo "mkdir Orgfiles"
orgfileDir="$HOME/Dropbox/Orgfiles"
mkdir -p "$orgfileDir/journal"
if [ ! -d "$HOME/Dropbox/Orgfiles" ]; then
echo "mkdir $orgfileDir"
mkdir -p "$orgfileDir/journal"
fi
# touch some files
echo "touch orgfiles"
touch $orgfileDir/master.org
touch $orgfileDir/journal.org
touch $orgfileDir/notes.org
touch $orgfileDir/meeting.org
if [ ! -f $orgfileDir/master.org ] ; then
echo "touch $orgfileDir/master.org"
touch $orgfileDir/master.org
fi
if [ ! -f $orgfileDir/journal.org ] ; then
echo "touch $orgfileDir/journal.org"
touch $orgfileDir/journal.org
fi
if [ ! -f $orgfileDir/notes.org ] ; then
touch $orgfileDir/notes.org
fi
if [ ! -f $orgfileDir/meeting.org ] then
echo "touch $orgfileDir/meeting.org"
touch $orgfileDir/meeting.org
fi
# add some useful aliases
# .. for bash
echo "alias em=emacs25" >> ~/.bashrc
echo "alias emacs=emacs25" >> ~/.bashrc
source ~/.bashrc
if [ -f ~/.bashrc ]; then
echo "make bash alias em"
echo "alias em=\"emacs25\"" >> ~/.bashrc
echo "alias emacs=\"emacs25\"" >> ~/.bashrc
source ~/.bashrc
fi
# .. and for zsh
echo "alias em=\"emacs25\"" >> ~/.zshrc
echo "alias emacs=\"emacs25\"" >> ~/.zshrc
source ~/.zshrc
if [ -f ~/.zshrc ]; then
echo "make zsh alias em"
echo "alias em=\"emacs25\"" >> ~/.zshrc
echo "alias emacs=\"emacs25\"" >> ~/.zshrc
source ~/.zshrc
fi
# download config file
if [ -d "$HOME/.emacs.d" ]
......@@ -37,4 +52,6 @@ then
mv $HOME/.emacs.d $HOME/.emacs.d.back
fi
echo "Clone emacs config.."
git clone https://gitlab.version.fz-juelich.de/chraibi1/san_emacs.git $HOME/.emacs.d
\ No newline at end of file
git clone https://gitlab.version.fz-juelich.de/chraibi1/san_emacs.git $HOME/.emacs.d
echo "start emacs ..."
em
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