Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed May 16, 2024
2 parents e3ad9ba + d185013 commit dee8ec6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 34 deletions.
45 changes: 45 additions & 0 deletions install-centos9-alt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

yum -y update
dnf -y --enablerepo=crb install libstdc++-static
dnf -y install epel-release epel-next-release
dnf -y install zeromq czmq
dnf -y install gcc g++ unzip
dnf -y install glibc-static unzip
dnf -y remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
dnf -y install yum-utils
dnf -y install wget
yum -y erase podman buildah
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install docker-ce docker-ce-cli containerd.io
systemctl start docker
cd ..
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
unzip ninja-linux.zip
mv ninja /usr/bin/
wget https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1-Linux-x86_64.sh
chmod +x cmake-3.19.1-Linux-x86_64.sh
./cmake-3.19.1-Linux-x86_64.sh --skip-license --prefix=/usr
#yum -y localinstall https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/c/czmq-3.0.2-3.el7.x86_64.rpm
yum --nobest -y localinstall https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/glibc-static-2.34-105.el9.x86_64.rpm https://rpmfind.net/linux/centos-stream/9-stream/CRB/x86_64/os/Packages/libxcrypt-static-4.4.18-3.el9.x86_64.rpm
cd cspot/
git submodule update --init --recursive
mv deps/libzmq/CMakeLists.txt deps/libzmq/CMakeLists.orig.txt
sed 's/build the tests" ON/build the tests" OFF/' deps/libzmq/CMakeLists.orig.txt > deps/libzmq/CMakeLists.txt
mkdir build
cd build/
#source ~/.bashrc
cmake -G Ninja ..
ninja
ninja install
#scl enable devtoolset-9 ./helper.sh
docker pull racelab/cspot-docker-centos7
docker tag racelab/cspot-docker-centos7 cspot-docker-centos7

if ! [[ $LD_LIBRARY_PATH == *"/usr/local/lib"* ]]; then
echo -e "if ! [[ \$LD_LIBRARY_PATH == *\"/usr/local/lib\"* ]]; then\nexport LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:/usr/local/lib\"\nfi" >> ~/.bashrc
source ~/.bashrc
fi
cp ../SELF-TEST.sh ./bin
cd ./bin
./SELF-TEST.sh
39 changes: 5 additions & 34 deletions install-rasp.sh
Original file line number Diff line number Diff line change
@@ -1,47 +1,18 @@
#!/bin/bash


apt-get update && apt-get -y install ninja-build g++-9 cmake g++
apt-get remove docker docker-engine docker.io containerd runc
#curl -fsSL https://get.docker.com -o get-docker.sh
#./get-docker.sh
apt-get update && apt-get -y install ninja-build cmake g++
apt-get remove -y docker docker-engine docker.io containerd runc
apt -y install docker.io
#yum -y install glibc-static unzip
#yum -y remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
#yum install -y yum-utils
#yum -y install wget
#yum -y erase podman buildah
#yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#yum -y install docker-ce docker-ce-cli containerd.io
#systemctl start docker
#cd ..
#wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
#unzip ninja-linux.zip
#mv ninja /usr/bin/
#wget https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1-Linux-x86_64.sh
#chmod +x cmake-3.19.1-Linux-x86_64.sh
#./cmake-3.19.1-Linux-x86_64.sh --skip-license --prefix=/usr
#yum -y localinstall https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/c/czmq-3.0.2-3.el7.x86_64.rpm
#git clone --branch release-2.0 https://github.com/Mayhem-lab/cspot
git submodule update --init --recursive
mkdir build
mkdir -p build
cd build/
#echo "#!/bin/bash" > helper.sh
#echo "cmake -G Ninja .." >> helper.sh
#echo "ninja" >> helper.sh
#echo "ninja install" >> helper.sh
#chmod 755 helper.sh
cmake -G Ninja ..
ninja
ninja install
cd ../Docker-build
cp Dockerfile.rpi3 Dockerfile
docker build --network=host -t cspot-docker-centos7 .
cd ../build
docker pull racelab/cspot-docker-centos7:armv6
docker tag racelab/cspot-docker-centos7:armv6 cspot-docker-centos7
cp ../SELF-TEST.sh ./bin
#scl enable devtoolset-9 ./helper.sh
#docker pull racelab/cspot-docker-centos7
#docker tag racelab/cspot-docker-centos7 cspot-docker-centos7

if ! [[ $LD_LIBRARY_PATH == *"/usr/local/lib"* ]]; then
echo -e "if ! [[ \$LD_LIBRARY_PATH == *\"/usr/local/lib\"* ]]; then\nexport LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:/usr/local/lib\"\nfi" >> ~/.bashrc
Expand Down

0 comments on commit dee8ec6

Please sign in to comment.