Ver código fonte

Auto-update webclient version in debian/readme.

Ian Walton 3 anos atrás
pai
commit
7efc8138f1
3 arquivos alterados com 11 adições e 13 exclusões
  1. 3 6
      README.md
  2. 1 3
      debian/rules
  3. 7 4
      download_webclient.sh

+ 3 - 6
README.md

@@ -30,10 +30,8 @@ sudo ldconfig
 cd ~/jmp/
 git clone git://github.com/iwalton3/jellyfin-media-player
 cd jellyfin-media-player
-mkdir build
+./download_webclient.sh
 cd build
-wget https://github.com/iwalton3/jellyfin-web-jmp/releases/download/jwc-1.7.2-2/dist.zip
-unzip dist.zip
 cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local/ ..
 make -j4
 sudo make install
@@ -63,9 +61,8 @@ You need to run these commands in git bash.
 ```bash
 git clone https://github.com/iwalton3/jellyfin-media-player
 cd jellyfin-media-player
-mkdir build && cd build
-curl -L https://github.com/iwalton3/jellyfin-web-jmp/releases/download/jwc-10.7.2-2/dist.zip > dist.zip
-unzip dist.zip
+./download_webclient.sh
+cd build
 ```
 
 Open the "x86_x64 Cross Tools Command Prompt for VS 2019". `cd` to the `build` directory. Run:

+ 1 - 3
debian/rules

@@ -1,13 +1,11 @@
 #! /usr/bin/make -f
 
-JWC_RELEASE := 10.7.2-2
-
 %:
 	dh $@
 
 override_dh_auto_build:
 	dh_auto_build $@
-	wget https://github.com/iwalton3/jellyfin-web-jmp/releases/download/jwc-$(JWC_RELEASE)/dist.zip
+	DOWNLOAD_ONLY=1 ./download_webclient.sh
 	unzip dist.zip -d obj-x86_64-linux-gnu/
 
 override_dh_auto_clean:

+ 7 - 4
download_webclient.sh

@@ -61,10 +61,13 @@ then
     echo "Downloading web client..."
     wc_version=$(get_resource_version iwalton3/jellyfin-web-jmp)
     download_compat dist.zip "https://github.com/iwalton3/jellyfin-web-jmp/releases/download/$wc_version/dist.zip" "wc"
-    rm -r build/dist 2> /dev/null
-    rm -r dist 2> /dev/null
-    unzip dist.zip > /dev/null && rm dist.zip
-    mv dist build/
+    if [[ "$DOWNLOAD_ONLY" != "1" ]]
+    then
+        rm -r build/dist 2> /dev/null
+        rm -r dist 2> /dev/null
+        unzip dist.zip > /dev/null && rm dist.zip
+        mv dist build/
+    fi
     echo "$wc_version" > .last_wc_version
 fi