so://phie

verbal

A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal

blob: dbebeb8e6d1aea5b73ee972a931a3e85b0efd6e9 (2286 bytes)[doc][blame][raw]

1#!/bin/bash

2

3echo "version $VERSION"

4

5DIST_DIR="./dist"

6

7echo "create $DIST_DIR/"

8mkdir -p "$DIST_DIR"

9echo "copy app/"

10cp -rf app "$DIST_DIR/app"

11echo "copy www/"

12cp -rf www "$DIST_DIR/www"

13

14echo "inject version"

15sed -i -e "s/{{version}}/$VERSION/g" "$DIST_DIR/www/worker.js"

16sed -i -e "s/{{version}}/$VERSION/g" "$DIST_DIR/app/main.js"

17

18LIB_DIR="$DIST_DIR/www/asset/lib"

19FONT_DIR="$DIST_DIR/www/asset/font"

20

21echo "create $LIB_DIR/"

22mkdir -p "$LIB_DIR"

23echo "create $FONT_DIR/"

24mkdir -p "$FONT_DIR"

25

26# tailwindcss

27echo "download tailwindcss"

28curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o "$DIST_DIR/tailwindcss"

29chmod +x "$DIST_DIR/tailwindcss"

30

31# vue

32echo "download vue"

33curl -sL https://cdn.jsdelivr.net/npm/vue@2/dist/vue.esm.browser.min.js -o "$LIB_DIR/vue.min.js"

34# curl -L https://unpkg.com/vue@latest/dist/vue.esm-browser.prod.js -o ./www/asset/lib/vue.min.js -s

35

36# tabler-icons

37echo "download tabler-icons"

38curl -sL https://cdn.jsdelivr.net/npm/@tabler/icons@latest/iconfont/tabler-icons.min.css -o "$LIB_DIR/tabler-icons.min.css"

39sed -i -e "s/fonts\/tabler-icons/..\/font\/tabler-icons/g" "$LIB_DIR/tabler-icons.min.css"

40echo "download tabler-icons font"

41curl -sL https://cdn.jsdelivr.net/npm/@tabler/icons@latest/iconfont/fonts/tabler-icons.eot -o "$FONT_DIR/tabler-icons.eot"

42curl -sL https://cdn.jsdelivr.net/npm/@tabler/icons@latest/iconfont/fonts/tabler-icons.ttf -o "$FONT_DIR/tabler-icons.ttf"

43curl -sL https://cdn.jsdelivr.net/npm/@tabler/icons@latest/iconfont/fonts/tabler-icons.woff -o "$FONT_DIR/tabler-icons.woff"

44curl -sL https://cdn.jsdelivr.net/npm/@tabler/icons@latest/iconfont/fonts/tabler-icons.woff2 -o "$FONT_DIR/tabler-icons.woff2"

45

46# inter

47echo "download inter font"

48curl -sL https://fonts.google.com/download?family=Inter -o "$FONT_DIR/inter.zip"

49unzip -qq "$FONT_DIR/inter.zip" -d "$FONT_DIR/inter"

50mv "$FONT_DIR/inter/static/Inter-Regular.ttf" "$FONT_DIR/"

51mv "$FONT_DIR/inter/static/Inter-Medium.ttf" "$FONT_DIR/"

52mv "$FONT_DIR/inter/static/Inter-SemiBold.ttf" "$FONT_DIR/"

53rm -rf "$FONT_DIR/inter"

54rm -rf "$FONT_DIR/inter.zip"

55

56echo "build css"

57"$DIST_DIR/tailwindcss" -c tailwind.config.js -i "$DIST_DIR/www/asset/css/input.css" -o "$DIST_DIR/www/asset/css/output.css" --minify

58

59echo "done"