测试安装包构建

This commit is contained in:
2023-01-03 19:21:32 +08:00
parent 895e55d964
commit fb0f9e1064
20 changed files with 290 additions and 81 deletions

View File

@@ -7,6 +7,7 @@ if [ ! -d "$1" ]; then
echo "路径不存在!"
exit 1
fi
programPath=`dirname $0`
echo $0
echo $1
echo $2
@@ -16,14 +17,15 @@ cd "$1"
# 拷贝 Qemu Static
cp -r /usr/bin/qemu-*-static ./usr/bin
# 挂载目录
mount --bind /dev ./dev
# 这里将由 pardus-chroot 处理
#mount --bind /dev ./dev
#mount --bind /dev/pts ./dev/pts
mount -t proc /proc ./proc
mount --bind /etc/resolv.conf ./etc/resolv.conf
mount -t sysfs /sys ./sys
#mount -t proc /proc ./proc
#mount --bind /etc/resolv.conf ./etc/resolv.conf
#mount -t sysfs /sys ./sys
#mount --bind /dev/shm ./dev/shm
chmod 777 -R root
chmod 777 -R root tmp
xhost +
# 如果参数 3 存在
chroot . ${@:3}
"$programPath/pardus-chroot" . ${@:3}