#!/bin/bash echo "requires sudo to run eg: sudo ./ecat.sh" # Removing old repo echo "removing old ethercat repository file and gpg keys\n" rm -f /etc/apt/sources.list.d/ighvh.sources /etc/apt/sources.list.d/linuxcnc-ethercat.list /etc/apt/sources.list.d/science_EtherLab.list /etc/apt/trusted.gpg.d/linuxcnc-ethercat.gpg /etc/apt/trusted.gpg.d/science_EtherLab.gpg* # Install ethercat repositories. echo "Install ethercat repository" mkdir -p /usr/local/share/keyrings/ wget -O- https://build.opensuse.org/projects/science:EtherLab/signing_keys/download?kind=gpg | gpg --dearmor | dd of=/etc/apt/trusted.gpg.d/science_EtherLab.gpg tee -a /etc/apt/sources.list.d/ighvh.sources > /dev/null <