今年要学习数据库,老师说让自学vb,课程设计的时候使用vb操作数据库,于是在linux下就安装了gambas来编写bv程序,但gambas的安装过程很是麻烦,于是就写了一个shell来自动安装gambas:
Packages_Related="
http://ftp.jp.debian.org/debian/pool/main/g/gambas/gambas-gb-net-curl_1.0.15-1.2_i386.deb
"
echo "--------starting install gambas-------------"
mkdir gambas
if [ -d "gambas" ]
then
cd gambas
else
echo "mkdir gambas error!exit..."
exit
fi
for package in $Packages_Related
do
wget $package
#tmpname=${package%/*.deb}
#tmp=${package#$tmpname}
#packagename=${tmp#/}
packagename=$package | awk -F'/' '{print $4}'
if [ -f $packagename ]
then
echo "---------install package $packagename----------"
sudo dpkg -i $packagename
else
echo "download package $packagename error..."
exit
fi
done
cd ../
rm -r gambas
echo "------------gambas has been installed------------"
exit
|
阅读(2642) | 评论(2) | 转发(0) |