]> git.armaanb.net Git - bin.git/blobdiff - patch-zoom
added patch-zoom
[bin.git] / patch-zoom
diff --git a/patch-zoom b/patch-zoom
new file mode 100755 (executable)
index 0000000..7a7058a
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+# From https://hashman.ca/zoom/. Patches a zoom .deb to remove the ibus dependency
+scratch=/tmp/patch-zoom
+rm -rf $scratch
+mkdir $scratch
+
+# Extract package contents
+cp $1 $scratch/zoom_amd64.deb
+dpkg -x $scratch/zoom_amd64.deb $scratch/extracted
+
+# Extract package control information
+dpkg -e $scratch/zoom_amd64.deb $scratch/extracted/DEBIAN
+
+# Remove the ibus dependency
+echo "Removing ibus"
+sed -i -E 's/(ibus, |, ibus)//' $scratch/extracted/DEBIAN/control
+
+# Rebuild the .deb
+dpkg -b $scratch/extracted $scratch/patched_zoom_amd64.deb
+
+echo "Package built, installing now"
+sudo dpkg -i $scratch/patched_zoom_amd64.deb
+sudo apt install -f