Install starship dictionary in ubuntu

Source: Internet
Author: User
#! /Bin/bash # installstardictif [[-f $ (whichstardict)] thenecho "" echo "Youhavestardictinstalled." echo "" & nbs

#! /Bin/bash

# Install stardict

If [[-f $ (which stardict)]

Then

Echo ""

Echo "You have stardict installed ."

Echo ""

Echo "Downloading dictionary files ..."

Echo ""

Sleep 3

Else

Sudo apt-get install stardict-y

Echo "Now stardict has been installed ."

Echo ""

Echo "Downloading dictionary files ..."

Echo ""

Sleep 3

Fi

# Definations

Passwd = "Ubuntu: ubuntuftp"

Url = "http: // $ passwd@ftp.ubuntu.org.cn/stardict.sourceforge.net"

Dir = "$ HOME/. stardict/dic"

# General dictionaries: 21 Century bi- Al, langdao, Wei, Oxford, Longman, and computer majors

Dict_1 = "stardict-21shijishuangxiangcidian-2.4.2.tar.bz2"

Dict_2 = "stardict-langdao-ce-gb-2.4.2.tar.bz2"

Dict_3 = "stardict-langdao-ec-gb-2.4.2.tar.bz2"

Dict_4 = "stardict-merrianwebster-2.4.2.tar.bz2"

Dict_5 = "stardict-oxford-gb-2.4.2.tar.bz2"

Dict_6 = "stardict-longman-2.4.2.tar.bz2"

Dict_7 = "stardict-computer-2.4.2.tar.bz2"

If [! -D $ dir]

Then

Mkdir-p $ dir

Fi

For dict in $ dict_1 $ dict_2 $ dict_3 $ dict_4 $ dict_5 $ dict_6 $ dict_7

Do

Wget-c $ url/$ dict-P $ HOME & tar jxf $ HOME/$ dict-C $ dir

Rm-rf $ HOME/$ dict

Echo ""

Done

Echo "Run 'stardict & 'in terminal, enjoy it ."

Echo ""

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.