aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Poldrack2021-04-14 21:36:41 +0200
committerMoritz Poldrack2021-04-14 21:36:41 +0200
commitc2edbb1aa668030916075f278d56f82c42482859 (patch)
treed1458f85aa320def31d1768f29214c3902dbf874
parent8e2bd531b5669475555a18415893be85cf99a1a7 (diff)
let's use the advanced automation framework vim
-rwxr-xr-xtoggle-multilib/vim.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/toggle-multilib/vim.sh b/toggle-multilib/vim.sh
new file mode 100755
index 0000000..644e82c
--- /dev/null
+++ b/toggle-multilib/vim.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+grep '^\[multilib]' /etc/pacman.conf >/dev/null && sudo vim /etc/pacman.conf '+%s/^\(\[multilib]\)\n\(.*\)/#\1\r#\2' +x || sudo vim /etc/pacman.conf '+%s/^#\(\[multilib\]\)\n#\(.*\)/\1\r\2' +x