diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-07-31 12:27:55 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-07-31 12:27:55 +0200 |
| commit | 4a4f055c2d3ff9ccfc50abacac20c9beb8792ee2 (patch) | |
| tree | 4ef5dd3de28407d0d7f4666130d668db4b1240ab /install | |
| parent | 9a7a7ba045aca17f3d0a33ce132c63c61043f361 (diff) | |
| download | dotfiles-4a4f055c2d3ff9ccfc50abacac20c9beb8792ee2.tar.gz dotfiles-4a4f055c2d3ff9ccfc50abacac20c9beb8792ee2.tar.bz2 dotfiles-4a4f055c2d3ff9ccfc50abacac20c9beb8792ee2.zip | |
Added download of english and french dictionaries to install script
Diffstat (limited to 'install')
| -rwxr-xr-x | install | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -4,7 +4,26 @@ # shellcheck source=/dev/null . config/zsh/zprofile -[ "$USER" = 'root' ] && { crontab 'crontab/root.crontab' ; exit ; } +if [ "$USER" = 'root' ] +then + crontab 'crontab/root.crontab' + + install_dict() { + url="$1" + archive_name="$(basename "$url")" + dir_name="${archive_name%%.tar.bz2}" + install_dir='/usr/share/stardict/dic' + [ ! -d "$install_dir" ] && mkdir -pv "$install_dir" + [ -d "$install_dir/$dir_name" ] && return + echo "----------------------------- Installing dictionary: $dir_name" + curl "$url" | tar -xjvf - -C "$install_dir" & + } + # other dictionaries at: http://download.huzheng.org/ + install_dict 'http://download.huzheng.org/dict.org/stardict-dictd_www.dict.org_gcide-2.4.2.tar.bz2' # english + install_dict 'http://download.huzheng.org/fr/stardict-xmlittre-2.4.2.tar.bz2' # french + + exit +fi mkdir -pv "$XDG_CONFIG_HOME" mkdir -pv "$XDG_DATA_HOME" |
