forked from kalaschnik/adobe-fonts-revealer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreveal.sh
38 lines (25 loc) · 1.3 KB
/
reveal.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
username=$USER
microsoftusername=${username:0:5}
printf "\nFont Revealer for Adobe Creative Cloud (Windows)\n\nSelect your user type and username to find the path to Adobe Fonts folder.\nYou can check C:/Users folder to see your actual username.\nMicrosoft account username takes the first 5 chars from email\n\nPlease choose your username:\n\n 1) Microsoft account user (Username: $microsoftusername)\n 2) Local user (Username: $username)\n\nYour choice (1/2): "
read account
if [ "$account" != "${account#[1]}" ] ;then
accounttype=$microsoftusername
printf "\nSelected Microsoft user account.\n\n"
else
accounttype=$username
printf "\nSelected Local user account.\n\n"
fi
cd /mnt/c/Users/$accounttype/AppData/Roaming/Adobe/CoreSync/plugins/livetype/r/
for file in *
do
# the "Postscript name:" does not contain spaces. good for file names.
fontName=`otfinfo --info ${file} | fgrep "PostScript name:" | grep -oE "[^ ]+$"`
# create a FONT dir within downloads, if there is none
mkdir -p /mnt/c/Users/$accounttype/Downloads/FONTS/
# copy files (if no dry-run)
cp $file "/mnt/c/Users/$accounttype/Downloads/FONTS/$fontName.otf"
# print changes:
printf "$file\t--->\t$fontName.otf\n"
done
printf "\nDONE!\nAll fonts downloaded to C:/User/$accounttype/Downloads/FONTS".