modified: pixi.toml
[GalaxyCodeBases.git] / etc / Mac / Fonts / getGoogleNoto.sh
blobcac1f0e7f4155d41f1532b1837208f44588b7eec
1 #!/bin/bash
3 function pause(){
4 tty_state=$(stty -g)
5 stty -icanon min 0 time 0
6 while read dummy; do : ; done
7 stty "$tty_state"
8 read -n1 -rsp "$*" < /dev/tty
9 echo
12 INSTPATH=/Users/Shared/Fonts/Noto/Noto-unhinted
14 mkdir -p $INSTPATH
16 if [ x"$1" = x"" ]; then
17 echo "Install downloaded zip files ..."
18 if [[ ! -f 'NotoSansCJK.ttc.zip' ]]; then
19 echo "[NotoSansCJK.ttc.zip] not found !"
20 exit 1
22 if [[ ! -f 'Noto-unhinted.zip' ]]; then
23 echo "[Noto-unhinted.zip] not found !"
24 exit 1
26 else
27 echo "Downloading Google files ..."
28 mv NotoSansCJK.ttc.zip NotoSansCJK.ttc.zip.last
29 mv Noto-unhinted.zip Noto-unhinted.zip.last
31 # http://www.google.com/get/noto/help/cjk/
32 wget https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip
33 wget https://noto-website-2.storage.googleapis.com/pkgs/Noto-unhinted.zip
36 ls -l NotoSansCJK.* Noto-unhinted.*
37 shasum NotoSansCJK.* Noto-unhinted.*
39 pause 'Press any key to continue or Ctrl+C to exit ... '
41 echo "Unzip files ..."
42 unzip -qod /Users/Shared/Fonts/Noto NotoSansCJK.ttc.zip
43 unzip -qod ${INSTPATH} Noto-unhinted.zip
45 ls -1 ${INSTPATH}/NotoSans*CJK* |cat -n
47 pause $'There shoud be 36 files.\nPress any key to continue ... '
49 rm ${INSTPATH}/NotoSans*CJK*
50 find /Users/Shared/Fonts/Noto -name '*.txt' -delete
51 echo "Cleaning done. You can remove NotoSansCJK.* Noto-unhinted.* now."
53 open /Users/Shared/Fonts/Noto