]> git.rmz.io Git - dotfiles.git/commitdiff
add clean-hunspell script
authorSamir Benmendil <samir.benmendil@gmail.com>
Fri, 22 Mar 2013 20:04:29 +0000 (21:04 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Fri, 22 Mar 2013 20:04:29 +0000 (21:04 +0100)
no moar unnecessary languages

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[@]}