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