learning shell check host dependent pkg (8)
【Purpose】
Shell script check host dependent pkg
【Eevironment】
Ubuntu 16.04 bash env
【Procdeure】
Source code:
dependent_pkg="gitk" for pkg in $dependent_pkg; do if ! dpkg-query -l $pkg | grep -q ii; then echo installing $pkg .. sudo apt-get -y install $pkg fi done