-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
executable file
·53 lines (45 loc) · 1.11 KB
/
install.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
#!/bin/bash
INSTALL_DIR=~/.site-lisp
CUSTOM_DIR=~/.emacs.d/custom
mkdir -p ${INSTALL_DIR}
mkdir -p ${CUSTOM_DIR}
# Install primary dotemacs file
cp -v dotemacs.emacs.elc ~/.emacs.elc
# Install Language Modes
LANGUAGE_MODES=`cat language_modes.txt`
for lang in $LANGUAGE_MODES
do
if [ $lang == 'scala' ]
then
cp -v scala-mode/*.el* ${INSTALL_DIR}/
else
MODE_FILE=${lang}-mode/${lang}-mode.elc
cp -v ${MODE_FILE} ${INSTALL_DIR}/
fi
done
# Miscellaneous .elc files
ELC_FILES=`cat elc_files.txt`
for elcfile in $ELC_FILES
do
# if [ "${elcfile: -4}" == ".elc" ]
if [[ ${elcfile} == *.elc ]]
then
# glob pattern or already has .elc extension, do not append .elc extension
f=${elcfile}
else
f="${elcfile}.elc"
fi
cp -v $f ${INSTALL_DIR}/
done
CUSTOM_ELC_FILES=`cat custom_elc_files.txt`
for elcfile in $CUSTOM_ELC_FILES
do
if [[ ${elcfile} == *.elc ]]
then
# glob pattern or already has .elc extension, do not append .elc extension
f=${elcfile}
else
f=${elcfile}.elc
fi
cp -v $f ${CUSTOM_DIR}/
done