diff --git a/install b/install index 6fa0ffc..b8f4c79 100755 --- a/install +++ b/install @@ -2,12 +2,17 @@ set -euo pipefail cd -- "$(dirname -- "$0")" -for dotfile in .*; do - [[ $dotfile =~ ^(\.\.?|\.git)$ ]] && continue +function main() { + local dotfile + for dotfile in .*; do + [[ $dotfile =~ ^(\.\.?|\.git)$ ]] && continue - dotfile=$(realpath "$dotfile") - ( - cd - ln -svf "$dotfile" . - ) -done + dotfile=$(realpath "$dotfile") + ( + cd + ln -svf "$dotfile" . + ) + done +} + +main