aboutsummaryrefslogtreecommitdiff
path: root/.scripts/adblock
blob: e02cf9233386232cfd3691e04561a7557376de7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

if grep -Fxq "##START" /etc/hosts
then
	sudo sed -i "/##START/,/##END/s/#\(.\)/\1/" /etc/hosts
	echo Enabled adblock!
else
	sudo sed -i "/#START/,/#END/s/./#&/" /etc/hosts
	echo Disabled adblock!
fi