packages_dir=/data/packages/temp/
場合 [ ! -d $packages_dir ]
then
mkdir -p $packages_dir
fi
downfile(){
count=0
for i in ${files_url[*]}
do
wget $i -O $packages_dir${files[$count]}"。 tgz"
tar xvzf $packages_dir${files[$count]}".tgz" -C $packages_dir
count=$(($count + 1))
完了
}
installfile(){
for z in $(ls $packages_dir)
do
pacname=$(tar tf $packages_dir/$z | head -1 | Cut -d / -f 1)
tar xvzf $packages_dir$z -C $packages_dir
python $packages_dir$pacname/setup.py install
完了
}
downfile
installfile
echo -e "# ############"
echo -e "#python ok#"
echo -e "#############"