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.
 
 
 

15 lines
376 B

#!/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