Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: directory /Users/user/Library/Fonts does not exist macOS Monterey 12.4 #381

Open
iamtodor opened this issue Jul 8, 2022 · 1 comment

Comments

@iamtodor
Copy link

iamtodor commented Jul 8, 2022

Hello, while installing the fonts I have some issues.

>>> illia.todorenko@Air-Demir ~ % git clone https://github.com/powerline/fonts.git
Cloning into 'fonts'...
remote: Enumerating objects: 968, done.
remote: Total 968 (delta 0), reused 0 (delta 0), pack-reused 968
Receiving objects: 100% (968/968), 20.28 MiB | 16.68 MiB/s, done.
Resolving deltas: 100% (393/393), done.
>>> illia.todorenko@Air-Demir ~ % cd fonts
>>> illia.todorenko@Air-Demir fonts % ./install.sh
Copying fonts...
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
cp: directory /Users/illia.todorenko/Library/Fonts does not exist
Powerline fonts installed to /Users/illia.todorenko/Library/Fonts
>>> illia.todorenko@Air-Demir fonts % cat install.
cat: install.: No such file or directory
>>> illia.todorenko@Air-Demir fonts % cat install.sh
#!/bin/sh

# Set source and target directories
powerline_fonts_dir="$( cd "$( dirname "$0" )" && pwd )"

# if an argument is given it is used to select which fonts to install
prefix="$1"

if test "$(uname)" = "Darwin" ; then
  # MacOS
  font_dir="$HOME/Library/Fonts"
else
  # Linux
  font_dir="$HOME/.local/share/fonts"
  mkdir -p $font_dir
fi

# Copy all fonts to user fonts directory
echo "Copying fonts..."
find "$powerline_fonts_dir" \( -name "$prefix*.[ot]tf" -or -name "$prefix*.pcf.gz" \) -type f -print0 | xargs -0 -n1 -I % cp "%" "$font_dir/"

# Reset font cache on Linux
if which fc-cache >/dev/null 2>&1 ; then
    echo "Resetting font cache, this may take a moment..."
    fc-cache -f "$font_dir"
fi

echo "Powerline fonts installed to $font_dir"
>>> illia.todorenko@Air-Demir ~ % ls /Library/Fonts
Arial Unicode.ttf
>>> illia.todorenko@Air-Demir ~ % cd /Library/Fonts
>>> illia.todorenko@Air-Demir Fonts % ls -la
total 0
drwxrwxr-t   3 root  admin    96 May  9 23:30 .
drwxr-xr-x  70 root  wheel  2240 Jul  8 12:58 ..
lrwxr-xr-x   1 root  wheel    52 May  9 23:30 Arial Unicode.ttf -> /System/Library/Fonts/Supplemental/Arial Unicode.ttf
>>> illia.todorenko@Air-Demir Fonts % pwd
/Library/Fonts
>>> illia.todorenko@Air-Demir Fonts % env $HOME
env: /Users/illia.todorenko: Permission denied
>>> illia.todorenko@Air-Demir Fonts % ls $HOME/Library/Fonts
ls: /Users/illia.todorenko/Library/Fonts: No such file or directory

System: macOS Monterey 12.4

Could you please help me with how to fix it?

@iamtodor
Copy link
Author

iamtodor commented Jul 8, 2022

The solution is to change this line https://github.com/powerline/fonts/blob/master/install.sh#L11 font_dir="$HOME/Library/Fonts" -> font_dir="/Library/Fonts"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant