Extends emacs config to support evil-mode
This commit is contained in:
parent
74968572d9
commit
e7b312ec56
3 changed files with 112 additions and 36 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
pc_settings_path="$HOME/pc_settings"
|
||||
pc_settings_path="${HOME}/pc_settings"
|
||||
|
||||
|
||||
config_files=( \
|
||||
|
|
@ -9,30 +9,30 @@ config_files=( \
|
|||
".tmux.conf" \
|
||||
".ctags" \
|
||||
".vimrc" \
|
||||
".emacs" \
|
||||
)
|
||||
|
||||
|
||||
for i in {0..3}; do
|
||||
for i in {1..5}; do
|
||||
cf="${config_files[i]}"
|
||||
echo "\"$cf\": "
|
||||
echo "\"${cf}\": "
|
||||
|
||||
if [ -f "$HOME/$cf" ] && [ ! -L "$HOME/$cf" ]; then
|
||||
echo -n "Backing up $cf ... " && \
|
||||
mv "$HOME/$cf" "$HOME/$cf.bak" && \
|
||||
if [ -f "${HOME}/${cf}" ] && [ ! -L "${HOME}/${cf}" ]; then
|
||||
echo -n "Backing up ${cf} ... " && \
|
||||
mv "${HOME}/${cf}" "${HOME}/${cf}.bak" && \
|
||||
echo "Done."
|
||||
fi
|
||||
|
||||
if [ -L "$HOME/$cf" ]; then
|
||||
if [ $(readlink "$HOME/$cf") = "$pc_settings_path/configs/$cf" ]; then
|
||||
echo "Already properly symlinked to \"$pc_settings_path/configs\"."
|
||||
if [ -L "${HOME}/${cf}" ]; then
|
||||
if [ $(readlink "${HOME}/${cf}") = "${pc_settings_path}/configs/${cf}" ]; then
|
||||
echo "Already properly symlinked to \"${pc_settings_path}/configs\"."
|
||||
else
|
||||
echo "Already symlinked but NOT to the proper location. Aborting..."
|
||||
fi
|
||||
else
|
||||
echo -n "Symlinking to $pc_settings_path/configs/$cf ... " && \
|
||||
ln -s "$pc_settings_path/configs/$cf" "$HOME/$cf" && \
|
||||
echo -n "Symlinking to ${pc_settings_path}/configs/${cf} ... " && \
|
||||
ln -s "${pc_settings_path}/configs/${cf}" "${HOME}/${cf}" && \
|
||||
echo "Done."
|
||||
fi
|
||||
echo ""
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue