#!/bin/bash - 
#===============================================================================
#
#          FILE:  install_32lib.sh
# 
#         USAGE:  ./install_32lib.sh 
# 
#   DESCRIPTION:  install lib 32 pkgs
# 
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Peng Zhihui (), zhihuipeng@linx-info.com
#       COMPANY: linx-info
#     COPYRIGHT: Copyright 2001-2014 Linx Technology Co.,Ltd.
#       CREATED: 2014年03月18日 16时17分49秒 CST
#      REVISION:  ---
#===============================================================================

#set -o nounset                              # Treat unset variables as an error

if [ "$(uname -m)" = "i686" ];then
    echo "i686 OS doesn't install 32lib pkgs"
    exit 0
fi

source ./functions

mkdir -p $TARGET/pkg_lib_i686

cp /Rocky/packages/*i686_lib#* $TARGET/pkg_lib_i686

cp /usr/lib/new_install/operation/finish_install/exec_install_lib_32.sh $TARGET/opt/

chmod +x $TARGET/opt/exec_install_lib_32.sh

chroot $TARGET /opt/exec_install_lib_32.sh >>$LOG_FILE 2>&1 && rm -rf $TARGET/opt/exec_install_lib_32.sh  $TARGET/pkg_lib_i686
