2023-01-19 23:50:18 +08:00
|
|
|
#!/usr/bin/env bash
|
2022-12-20 12:05:36 +08:00
|
|
|
set -e
|
|
|
|
|
2022-12-22 11:06:49 +08:00
|
|
|
if [[ -d "$HOME/.vim" ]]; then
|
|
|
|
if [[ -d "$HOME/.vim/dict" && -f "$HOME/.vim/dict/ultimate.db" ]]; then
|
|
|
|
echo 'db has been installed'
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo '$HOME/.vim not exist'
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-12-20 12:05:36 +08:00
|
|
|
wget https://github.com/skywind3000/ECDICT-ultimate/releases/download/1.0.0/ecdict-ultimate-sqlite.zip -O /tmp/dict.zip
|
|
|
|
|
|
|
|
unzip /tmp/dict.zip -d $HOME/.vim/dict
|
|
|
|
|
|
|
|
rm -rf /tmp/dict.zip
|