#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")"))"

BASH_SCRIPTS_DIR="${DIR}/bash"

BASH_SCRIPTS=(`ls $BASH_SCRIPTS_DIR`)

for FILENAME in "${BASH_SCRIPTS[@]}"; do
  BASH_SCRIPT_FILE_PATH="${BASH_SCRIPTS_DIR}/${FILENAME}"
  SYMLINK_PATH="${HOME}/${FILENAME}"

  if [[ ! -f "${SYMLINK_PATH}" ]]; then
    ln -s "${BASH_SCRIPT_FILE_PATH}" "${SYMLINK_PATH}"
  fi
done