#!/bin/bash
# Macroscop Repository

sudo apt-get update && \
    sudo apt-get install alt-gpgkeys apt-https

curl -o ~/macroscop.gpg https://packages.macroscop.com/rpm/altlinux/macroscop.gpg && \
    sudo gpg --no-default-keyring --keyring /usr/lib/alt-gpgkeys/pubring.gpg --import ~/macroscop.gpg

sudo echo 'simple-key "macroscop" {
       Fingerprint "5C2AE097000A1F45D8D40AD781867B1F80369656";
       Name "Macroscop <support@macroscop.com>";
}' | sudo tee /etc/apt/vendors.list.d/macroscop.list > /dev/null

echo "rpm [macroscop] https://packages.macroscop.com/rpm/altlinux x86_64 main" \
   | sudo tee /etc/apt/sources.list.d/macroscop.list > /dev/null

sudo apt-get update