scripts/pubkey.sh

93 lines
2.9 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
################################################################################################
##
## Nom: pubkey.sh
##
## Licence: Creative Commons
##
## Comportement: Permet d'obtenir la clé publique d'un dépôt en indiquant la "clef" donnée par l'erreur "NO PUBKEY"
##
##
##
################################################################################################
##
## Date de création: 29-08-2011
##
## Auteur: ggoodluck47
## Lien: http://www.isalo.org/wiki.debian-fr/index.php?title=Erreur_lors_d%27un_update:_NO_PUBKEY#Un_script_pour_se_simplifier_la_vie
##
##
## Dernière modifications:
## 29-08-2011: - Création
# **********************************************************************************************
## //2011: -
## -
# **********************************************************************************************
##
##
##
################################################################################################
# **********************************************************************************************
#
# Variables globales
#
# -----------------------------------------------------------
# 
# Fin des variables globales
# -----------------------------------------------------------
# **********************************************************************************************
# **********************************************************************************************
#
# Fichiers globaux
#
# -----------------------------------------------------------
#
# Fin des fichiers globaux
# -----------------------------------------------------------
# **********************************************************************************************
# **********************************************************************************************
#
# Fonctions globales
#
# -----------------------------------------------------------
# Divers echos ...
echoi() { echo " (ii) $*" >> "${log}" ; }
echok() { echo " (ok) $*" >> "${log}" ; }
echow() { echo " (!!) $*" >> "${log}" ; }
echnk() { echo " (EE) $*" >> "${log}" ; }
# Fin des fonctions globales
# -----------------------------------------------------------
# **********************************************************************************************
# **********************************************************************************************
#
# Programme principale
#
# -----------------------------------------------------------
# Ajouter une clé GPG au porte-clef
# Utiliser gpgkeys pour gérer la suppression
echo "coller la clef (8 caractères)"
read clef
gpg --keyserver pgpkeys.mit.edu --recv-key $clef
gpg -a --export $clef | sudo apt-key add -
exit 0
# Fin de la boucle principale
# -----------------------------------------------------------
# **********************************************************************************************