setup 361 B

12345678910111213141516
  1. #!/bin/bash
  2. # relpath
  3. source ../bash/functions
  4. link_path="$HOME/.screenrc"
  5. target_name="screenrc"
  6. script_dir="$( dirname "${BASH_SOURCE[0]}" )"
  7. target_path="$( relpath "${script_dir}/${target_name}" "$(dirname "${link_path}")" )"
  8. if [ -e "${link_path}" ]; then
  9. mv --backup=numbered "$link_path" "${link_path}.old"
  10. fi
  11. ln -s "$target_path" "$link_path"