]> git.armaanb.net Git - bin.git/blob - patch-zoom
added patch-zoom
[bin.git] / patch-zoom
1 #!/usr/bin/env bash
2 # From https://hashman.ca/zoom/. Patches a zoom .deb to remove the ibus dependency
3 scratch=/tmp/patch-zoom
4 rm -rf $scratch
5 mkdir $scratch
6
7 # Extract package contents
8 cp $1 $scratch/zoom_amd64.deb
9 dpkg -x $scratch/zoom_amd64.deb $scratch/extracted
10
11 # Extract package control information
12 dpkg -e $scratch/zoom_amd64.deb $scratch/extracted/DEBIAN
13
14 # Remove the ibus dependency
15 echo "Removing ibus"
16 sed -i -E 's/(ibus, |, ibus)//' $scratch/extracted/DEBIAN/control
17
18 # Rebuild the .deb
19 dpkg -b $scratch/extracted $scratch/patched_zoom_amd64.deb
20
21 echo "Package built, installing now"
22 sudo dpkg -i $scratch/patched_zoom_amd64.deb
23 sudo apt install -f