新增安装运行库功能

This commit is contained in:
gfdgd xi 2023-03-19 13:00:40 +08:00
parent d29c13f7f2
commit 0bcdc5a5ba
16 changed files with 264 additions and 0 deletions

20
InstallRuntime/amd64.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=amd64
libPath=/usr/lib/x86_64-linux-gnu/
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

20
InstallRuntime/arm64.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=arm64
libPath=/usr/lib/aarch64-linux-gnu
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

20
InstallRuntime/armhf.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=armhf
libPath=/usr/lib/arm-linux-gnueabihf/
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

20
InstallRuntime/i386.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=i386
libPath=/usr/lib/i386-linux-gnu/
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=mips64el
libPath=/usr/lib/mips64el-linux-gnuabi64
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

20
InstallRuntime/ppc64el.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=ppc64el
libPath=/usr/lib/powerpc64le-linux-gnu/
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=amd64
libPath=/usr/lib/x86_64-linux-gnu/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=arm64
libPath=/usr/lib/aarch64-linux-gnu
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=armhf
libPath=/usr/lib/arm-linux-gnueabihf/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=i386
libPath=/usr/lib/i386-linux-gnu/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=mips64el
libPath=/usr/lib/mips64el-linux-gnuabi64/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=ppc64el
libPath=/usr/lib/powerpc64le-linux-gnu/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=riscv64
libPath=/usr/lib/riscv64-linux-gnu/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

View File

@ -0,0 +1,13 @@
#!/bin/bash
arch=s390x
libPath=/usr/lib/s390x-linux-gnu/
package=$arch-runtime-for-qemu
if [[ ! -d $libPath ]]; then
echo "未安装 $arch 运行库,按回车键退出"
read
exit 1
fi
sudo apt purge $package -y
echo 卸载完成,按回车键退出
read

20
InstallRuntime/riscv64.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=riscv64
libPath=/usr/lib/riscv64-linux-gnu/
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read

20
InstallRuntime/s390x.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
arch=s390x
libPath=/usr/lib/s390x-linux-gnu/
version=1.0.0
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
fileName=`basename $url`
if [[ -d $libPath ]]; then
echo "已安装 $arch 运行库,按回车键退出"
read
exit 1
fi
if [[ -f /tmp/$fileName ]]; then
rm "/tmp/$fileName"
fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update
sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出
read