forked from kalaschnik/adobe-fonts-revealer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreveal-r-and-w-folders
55 lines (43 loc) · 1.65 KB
/
reveal-r-and-w-folders
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
echo "❦ Font Revealer for Adobe Creative Cloud ❦"
echo "Dry-Run will preview the renaming process without copy any files."
select dce in "Dry-Run" "Copy" "Exit"; do
case $dce in
Dry-Run ) isDry=true; echo "Dry-running..."; break;;
Copy ) isDry=false; echo "Copy & rename files..."; break;;
Exit ) exit;;
esac
done
echo "Running for .r folder"
cd $HOME/Library/Application\ Support/Adobe/CoreSync/plugins/livetype/.r/
# grab all otf dot files (adjust to your needs)
for file in .*.otf
do
# the "Postscript name:" does not contain spaces. good for file names.
fontName=`otfinfo --info ${file} | fgrep "PostScript name:" | grep -oE "[^ ]+$"`
if [ "$isDry" = false ] ; then
# create a FONT dir within downloads, if there is none
mkdir -p $HOME/Downloads/FONTS/
# copy files (if no dry-run)
cp $file "$HOME/Downloads/FONTS/$fontName.otf"
fi
# echo changes:
echo "$file\t⮕\t$fontName.otf"
done
echo "Running for .w folder"
cd $HOME/Library/Application\ Support/Adobe/CoreSync/plugins/livetype/.w/
# grab all otf dot files (adjust to your needs)
for file in .*.otf
do
# the "Postscript name:" does not contain spaces. good for file names.
fontName=`otfinfo --info ${file} | fgrep "PostScript name:" | grep -oE "[^ ]+$"`
if [ "$isDry" = false ] ; then
# create a FONT dir within downloads, if there is none
mkdir -p $HOME/Downloads/FONTS/
# copy files (if no dry-run)
cp $file "$HOME/Downloads/FONTS/$fontName.otf"
fi
# echo changes:
echo "$file\t⮕\t$fontName.otf"
done
echo "🚀 DONE! Check your 'FONTS' directory within Downloads if you selected Option 2 (Copy)".