kapsikkum-unmanic – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | #!/bin/bash |
2 | # -*- coding: utf-8 -*- |
||
3 | ################################################################################################### |
||
4 | # |
||
5 | # Written by: Josh.5 <jsunnex@gmail.com> |
||
6 | # Date: Thu Jul 03 2021, (18:39:00 PM) |
||
7 | # |
||
8 | # Copyright: |
||
9 | # Copyright (C) Josh Sunnex - All Rights Reserved |
||
10 | # |
||
11 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
||
12 | # of this software and associated documentation files (the "Software"), to deal |
||
13 | # in the Software without restriction, including without limitation the rights |
||
14 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||
15 | # copies of the Software, and to permit persons to whom the Software is |
||
16 | # furnished to do so, subject to the following conditions: |
||
17 | # |
||
18 | # The above copyright notice and this permission notice shall be included in all |
||
19 | # copies or substantial portions of the Software. |
||
20 | # |
||
21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||
22 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||
23 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
||
24 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
||
25 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
||
26 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |
||
27 | # OR OTHER DEALINGS IN THE SOFTWARE. |
||
28 | # |
||
29 | # |
||
30 | ################################################################################################### |
||
31 | |||
32 | project_root="$(readlink -e $(dirname $(readlink -e ${BASH_SOURCE[0]}))/../)" |
||
33 | |||
34 | # Build backage |
||
35 | pushd "${project_root}/unmanic/webserver/frontend" &> /dev/null |
||
36 | npm install |
||
37 | npm run build |
||
38 | popd &> /dev/null |
||
39 | |||
40 | # Copy dist package backage |
||
41 | pushd "${project_root}/unmanic/webserver" &> /dev/null |
||
42 | if [ ! -d "${project_root}/unmanic/webserver/frontend/dist/spa" ]; then |
||
43 | echo "Cannot find built dist package for the frontend. Something must have gone wrong. Exit" |
||
44 | exit 1 |
||
45 | fi |
||
46 | rm -rf "${project_root}/unmanic/webserver/public" |
||
47 | mv -v "${project_root}/unmanic/webserver/frontend/dist/spa" "${project_root}/unmanic/webserver/public" |
||
48 | popd &> /dev/null |