[smc-discuss] [Git][smc/smc-website][master] Add support for gayathri and cleanup the code

Balasankar "Balu" C gitlab at mg.gitlab.com
Sat Feb 16 21:46:35 PST 2019


Balasankar "Balu" C pushed to branch master at SMC / SMC Website


Commits:
0a9d85c9 by Balasankar "Balu" C at 2019-02-17T05:09:08Z
Add support for gayathri and cleanup the code

- - - - -


1 changed file:

- update_fonts.sh


Changes:

=====================================
update_fonts.sh
=====================================
@@ -6,17 +6,25 @@ FONTS_SLUG=${FONTS_URL/\//%2F}
 
 mkdir -p downloads/fonts
 cd downloads/fonts || exit
-fonts=(anjalioldlipi rachana meera manjari raghumalayalamsans dyuthi keraleeyam uroob chilanka karumbi)
+fonts=(gayathri anjalioldlipi rachana meera manjari raghumalayalamsans dyuthi keraleeyam uroob chilanka karumbi )
 for font in "${fonts[@]}"; do
-        mkdir -p "$font"
-        cd "$font" || exit
         version=$(curl -sSL "https://gitlab.com/api/v4/projects/${FONTS_SLUG}%2F${font}/repository/tags"| jq '.[].name' | grep -i version | sort -V | tail -1 | tr -d '"')
+
         echo "$font : $version"
+        if [ -z "${version}" ]; then
+                echo "No version found. Skipping."
+                continue
+        fi
+
+        mkdir -p "$font"
+        cd "$font" || exit
+
         wget -q "https://gitlab.com/${FONTS_URL}/${font}/-/jobs/artifacts/${version}/download?job=build-tag" -O artifacts.zip
         unzip -q artifacts.zip
-        rm artifacts.zip
         mv build/* .
-        rm -rf build
+
+        rm -rf build artifacts.zip
+
         zip -qr "${font}.zip" . -i "*.ttf" -i "*.otf" -i "*.woff" -i "*.woff2" -j
         cd ../ || exit
 done



View it on GitLab: https://gitlab.com/smc/smc-website/commit/0a9d85c94c027acba7ea51a7710918aec9da82e4

-- 
View it on GitLab: https://gitlab.com/smc/smc-website/commit/0a9d85c94c027acba7ea51a7710918aec9da82e4
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.smc.org.in/pipermail/discuss-smc.org.in/attachments/20190217/6c23d44f/attachment-0002.html>


More information about the discuss mailing list