iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mail improvements
[distro-setup]
/
brc
diff --git
a/brc
b/brc
index 1c1f0f8ac8fb2b4ebfe3be8196b31e21692ccaa0..9e9752c18d33c9da89120b008acbcd9892d82a1d 100644
(file)
--- a/
brc
+++ b/
brc
@@
-735,7
+735,7
@@
fdup() {
local p
fdroidcl update
if fdroidcl search -u | grep ^org.fdroid.fdroid; then
local p
fdroidcl update
if fdroidcl search -u | grep ^org.fdroid.fdroid; then
- fdroidcl
upgrade
org.fdroid.fdroid
+ fdroidcl
install
org.fdroid.fdroid
sleep 5
fdroidcl update
fi
sleep 5
fdroidcl update
fi
@@
-754,7
+754,7
@@
fdup() {
done
for p in ${!installed[@]}; do
if ! ${updated[$p]:-true}; then
done
for p in ${!installed[@]}; do
if ! ${updated[$p]:-true}; then
- fdroidcl
upgrade
$p
+ fdroidcl
install
$p
sleep 5
fi
done
sleep 5
fi
done
@@
-991,6
+991,9
@@
grr() { # grep recursive
grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -RiIP --color=auto "$@"
fi
}
grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -RiIP --color=auto "$@"
fi
}
+rg() {
+ command rg -i -M 200 "$@"
+}
hstatus() {
# do git status on published repos
hstatus() {
# do git status on published repos
@@
-1276,6
+1279,20
@@
net-dev-info() {
}
}
+nk() {
+ ser stop NetworkManager
+ ser stop dnsmasq
+ s resolvconf -d NetworkManager
+ ser start dnsmasq
+ s ifup br0
+}
+ngo() {
+ s ifdown br0
+ ser start NetworkManager
+ sleep 4
+ s nmtui-connect
+}
+
nopanic() {
sudo tee -a /var/log/exim4/paniclog-archive </var/log/exim4/paniclog; sudo truncate -s0 /var/log/exim4/paniclog
}
nopanic() {
sudo tee -a /var/log/exim4/paniclog-archive </var/log/exim4/paniclog; sudo truncate -s0 /var/log/exim4/paniclog
}
@@
-1411,6
+1428,11
@@
r() {
rbpipe() { rbt post -o --diff-filename=- "$@"; }
rbp() { rbt post -o "$@"; }
rbpipe() { rbt post -o --diff-filename=- "$@"; }
rbp() { rbt post -o "$@"; }
+rebr() {
+ s ifdown br0
+ s ifup br0
+}
+
resolvcat() {
local f
f=/etc/resolv.conf
resolvcat() {
local f
f=/etc/resolv.conf
@@
-1559,22
+1581,6
@@
srestart() {
systemctl restart $service
fi
}
systemctl restart $service
fi
}
-stopnm() {
- ser stop NetworkManager
- ser stop dnsmasq
- s resolvconf -d NetworkManager
- ser start dnsmasq
- s ifup br0
-}
-startnm() {
- s ifdown br0
- ser start NetworkManager
- s nmtui-connect
-}
-rebr() {
- s ifdown br0
- s ifup br0
-}
setini() { # set a value in a .ini style file
key="$1" value="$2" section="$3" file="$4"
setini() { # set a value in a .ini style file
key="$1" value="$2" section="$3" file="$4"
@@
-1800,9
+1806,8
@@
testmail() {
# MSG_ID is in /var/log/exim4/mainlog, looks like 1ccdnD-0001nh-EN
}
# MSG_ID is in /var/log/exim4/mainlog, looks like 1ccdnD-0001nh-EN
}
-# to test sieve, use below command. for fsf mail, see
fsf-get-mail script.
+# to test sieve, use below command. for fsf mail, see
offlineimap-sync script
# make modifications, then copy to live file, use -eW to actually modify mailbox
# make modifications, then copy to live file, use -eW to actually modify mailbox
-# cp /p/c/subdir_files/sieve/personal{test,}.sieve; testsievelist -eW INBOX
#
# Another option is to use sieve-test SCRIPT MAIL_FILE. note,
# sieve-test doesnt know about envelopes, Im not sure if sieve-filter does.
#
# Another option is to use sieve-test SCRIPT MAIL_FILE. note,
# sieve-test doesnt know about envelopes, Im not sure if sieve-filter does.
@@
-1810,15
+1815,17
@@
testmail() {
# sieve with output filter. arg is mailbox, like INBOX.
# This depends on dovecot conf, notably mail_location in /etc/dovecot/conf.d/10-mail.conf
# sieve with output filter. arg is mailbox, like INBOX.
# This depends on dovecot conf, notably mail_location in /etc/dovecot/conf.d/10-mail.conf
-
testsievelist
() {
- sieve-filter
~/sieve/maintest.sieve "$@" >/tmp/testsieve.log 2> >(tail) && sed -rn '/^Performed actions:/{n;n;p}' /tmp/testsieve.log | sort -u
+
_dosieve
() {
+ sieve-filter
"$@" 2> >(head; tail) >/tmp/testsieve.log && sed -rn '/^Performed actions:/,/^[^ ]/{/^ /p}' /tmp/testsieve.log | sort | uniq -c
}
}
-
-# mail related
-# plain sieve
+# always run this first, edit the test files, then run the following
testsieve() {
testsieve() {
- sieve-filter ~/sieve/main.sieve "$@"
+ _dosieve ~/sieve/maintest.sieve INBOX delete
+}
+runsieve() {
+ c ~/sieve; cp personal{test,}.sieve; cp lists{test,}.sieve
+ _dosieve ~/sieve/main.sieve -eW INBOX delete
}
# mail related
}
# mail related
@@
-2287,8
+2294,12
@@
path_add /usr/local/go/bin
# ARDUINO_PATH=/a/opt/Arduino/build/linux/work
export ARDUINO_PATH=/a/opt/arduino-1.8.9
# ARDUINO_PATH=/a/opt/Arduino/build/linux/work
export ARDUINO_PATH=/a/opt/arduino-1.8.9
+# They want to be added to the start, but i think
+# that should be avoided unless we really need it.
path_add --end ~/.npm-global
path_add --end ~/.npm-global
+path_add --end $HOME/.cargo/bin
+
# taken from default changes to bashrc and bash_profile
path_add --end $HOME/.rvm/bin
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# taken from default changes to bashrc and bash_profile
path_add --end $HOME/.rvm/bin
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*