瀏覽代碼

Get libwacom-surface from GitHub releases

Automatically download libwacom-surface from its GitHub release page [1]
and remove the package from this repository.

[1]: https://github.com/qzed/libwacom-surface-deb/releases
Maximilian Luz 5 年之前
父節點
當前提交
2b8cf4001c
共有 2 個文件被更改,包括 15 次插入4 次删除
  1. 二進制
      packages/libwacom/libwacom-surface_1.1-1_amd64.deb
  2. 15 4
      setup.sh

二進制
packages/libwacom/libwacom-surface_1.1-1_amd64.deb


+ 15 - 4
setup.sh

@@ -66,9 +66,20 @@ read -rp "Do you want to install the patched libwacom packages? (type yes or no)
     uselibwacom;echo
 
 if [ "$uselibwacom" = "yes" ]; then
-    echo "==> Installing patched libwacom packages..."
-    dpkg -i packages/libwacom/*.deb
-    apt-mark hold libwacom
+    echo "==> Downloading latest libwacom-surface..."
+
+    urls=$(curl --silent "https://api.github.com/repos/qzed/libwacom-surface-deb/releases/latest" \
+           | tr ',' '\n' \
+           | grep '"browser_download_url":' \
+           | sed -E 's/.*"([^"]+)".*/\1/' \
+           | grep '.deb$')
+
+    wget -P tmp $urls
+
+    echo "==> Installing latest libwacom-surface..."
+
+    dpkg -i tmp/*.deb
+    rm -rf tmp
 else
     echo "==> Not touching libwacom"
 fi
@@ -85,7 +96,7 @@ if [ "$removexorg" = "yes" ]; then
     rm -v /etc/X11/xorg.conf.d/20-intel_example.conf
 else
     echo "==> Not touching example intel xorg config" \
-         "    (/etc/X11/xorg.conf.d/20-intel_example.conf)"
+         "(/etc/X11/xorg.conf.d/20-intel_example.conf)"
 fi
 
 echo