Skip to content

Commit

Permalink
Prettify colorPicker symlink fix output.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Oct 27, 2014
1 parent 3de9850 commit 4dee59a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions init/30_osx_homebrew_casks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,17 @@ fi

# Work around colorPicker symlink issue.
# https://github.com/caskroom/homebrew-cask/issues/7004
cps=()
for f in ~/Library/ColorPickers/*.colorPicker; do
[[ -L "$f" ]] || continue
target="$(readlink "$f")"
basename="$(basename "$f")"
e_arrow "Replacing $basename symlink with copy"
rm "$f"
cp -R "$target" ~/Library/ColorPickers/
[[ -L "$f" ]] && cps=("${cps[@]}" "$f")
done

if (( ${#cps[@]} > 0 )); then
e_header "Fixing colorPicker symlinks"
for f in "${cps[@]}"; do
target="$(readlink "$f")"
e_arrow "$(basename "$f")"
rm "$f"
cp -R "$target" ~/Library/ColorPickers/
done
fi

0 comments on commit 4dee59a

Please sign in to comment.