You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
376 B

  1. #!/bin/bash
  2. DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
  3. BASH_SCRIPTS_DIR="${DIR}/bash"
  4. BASH_SCRIPTS=(`ls $BASH_SCRIPTS_DIR`)
  5. for FILENAME in "${BASH_SCRIPTS[@]}"; do
  6. BASH_SCRIPT_FILE_PATH="${BASH_SCRIPTS_DIR}/${FILENAME}"
  7. SYMLINK_PATH="${HOME}/${FILENAME}"
  8. if [[ ! -f "${SYMLINK_PATH}" ]]; then
  9. ln -s "${BASH_SCRIPT_FILE_PATH}" "${SYMLINK_PATH}"
  10. fi
  11. done