]> git.rmz.io Git - dotfiles.git/commitdiff
Merge branch 'master' of tardis:/dotfiles
authorSamir Benmendil <samir.benmendil@gmail.com>
Sun, 9 Jun 2013 22:30:05 +0000 (00:30 +0200)
committerSamir Benmendil <samir.benmendil@gmail.com>
Sun, 9 Jun 2013 22:30:05 +0000 (00:30 +0200)
bin/clean-hunspell [new file with mode: 0755]

diff --git a/bin/clean-hunspell b/bin/clean-hunspell
new file mode 100755 (executable)
index 0000000..625e4c3
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# make sure to only remove symlinks and unneeded dicts
+keep_dicts=('de_DE' 'fr_FR' 'en_US' 'en_GB')
+dicts="$(ls /usr/share/hunspell/* /usr/share/myspell/dicts/*)"
+
+for keep_dict in ${keep_dicts[@]}; do
+    dicts=$(echo $dicts | sed  "s/\S*${keep_dict}\S* //g")
+done
+
+sudo rm ${dicts[@]}