Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hefroy committed Aug 29, 2023
1 parent 93ab33b commit e94fb2e
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions tools/install-deps-cross-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,31 @@ if [ "${ARCH}" == "arm64" ]; then
exit -1
fi

sed -i "s/deb http/deb [arch=${ARCH}] http/g" /etc/apt/sources.list
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cat /etc/apt/sources.list
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cat /etc/apt/apt-mirrors.txt
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"

sed -i -E "s/deb (http|mirror+file)/deb [arch=${ARCH}] \\1/g" /etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.d/arm64.list
sed -i "s/deb \[arch=${ARCH}\] http/deb [arch=arm64] http/g" /etc/apt/sources.list.d/arm64.list
sed -i -E "s#(archive|security).ubuntu.com/ubuntu#ports.ubuntu.com/ubuntu-ports#g" /etc/apt/sources.list.d/arm64.list
# GitHub uses a separate mirrors file
if [ -f /etc/apt/apt-mirrors.txt ]; then
cp /etc/apt/apt-mirrors.txt /etc/apt/apt-mirrors-arm64.txt
sed -i -E "s#/etc/apt/apt-mirrors.txt#/etc/apt/apt-mirrors-arm64.txt#g" /etc/apt/sources.list.d/arm64.list
PATCH_FILE="/etc/apt/apt-mirrors-arm64.txt"
else
PATCH_FILE="/etc/apt/sources.list.d/arm64.list"
fi
sed -i -E "s#(archive|security).ubuntu.com/ubuntu#ports.ubuntu.com/ubuntu-ports#g" ${PATCH_FILE}

echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cat /etc/apt/sources.list.d/arm64.list
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cat /etc/apt/apt-mirrors-arm64.txt
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"

dpkg --add-architecture arm64
apt update
apt install -y \
Expand Down

0 comments on commit e94fb2e

Please sign in to comment.