Linux shell completes automatic deployment of QT programs

Source: Internet
Author: User

#!/bin/SH#取当前脚本的绝对路径srcDir=$ (CD"$ (dirname"$0")";pwd) #设置库所在路径libDir=${srcdir}"/j1900runlib/*"#设置目标路径desDir="/usr/lib/x86_64_linux_gnu"#将库文件全部拷贝至指定路径CP$libDir $desDir # joins the absolute path of the current script to the environment variableEcho$srcDir >>/etc/LD. so.conf# Reload environment variable Ldconfig

The above content is written to copylib.sh.

1, first get the absolute path of the script execution, not directly with the $PWD, in the command line execution there will be a problem

2, QT library files placed in the J1900runlib folder, stitching out the library file path

3. Destination Address

4. Copy the QT library file to Desdir

5. Add the absolute path of the current script to the environment variable

6. Reload Environment variables

Execute copylib.sh can complete the deployment of the program, after the completion of the program can be directly started.

Linux shell completes automatic deployment of QT programs

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.