-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathemacs_build_from_source.sh
executable file
·56 lines (43 loc) · 1.23 KB
/
emacs_build_from_source.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash -
#===============================================================================
#
# FILE: emacs_build_from_source.sh
#
# USAGE: ./emacs_build_from_source.sh
#
# DESCRIPTION: Build Emacs from source
#
# OPTIONS:
# REQUIREMENTS:
# BUGS: ---
# NOTES: Clone this repo git://git.savannah.gnu.org/emacs.git
# AUTHOR: Bhaskar Chowdhury (https://about.me/unixbhaskar), [email protected]
# ORGANIZATION: Independent
# CREATED: 09/24/2021 17:37
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
basepath=/home/bhaskar/git-linux/
cd $basepath
if [ ! -d emacs ];then
git clone git@git://git.savannah.gnu.org/emacs.git
cd emacs
elif [ -d emacs ];then
cd emacs
git pull
else
printf "The Emacs directory already exists....not cloning \n"
exit 1
fi
printf "Lets build it on.....$(hostname)"
./configure
make
if [ $? -eq 0 ] ; then
printf "Do you want to install system wide? [Y/N]: %s"
read -r res
if [ "$res" == "Y" ];then
sudo make install
else
printf "Okay, you not want to install it system wide....not installing "
fi
fi