about summary refs log tree commit diff
path: root/emacs/symlink_custom_functions.sh
blob: 292d4e3f7492157b6afad19b402a2fcbbcef0add (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env zsh

SCRIPT_DIR="$HOME/pc_settings/emacs"
EMACS_FUNC_DIR="$HOME/.emacs.d"

for source in $(find $SCRIPT_DIR -type f -name '*.el'); do
  filename=$(basename $source)
  target="${EMACS_FUNC_DIR}/${filename}"

  if [ ! -L $target ]; then
    echo -n "Creating symlink for ${filename} ... " && \
    ln -s $source $EMACS_FUNC_DIR && \
    echo "Done."
  else
    echo "${filename} is already properly symlinked."
  fi

done