93 lines
2.9 KiB
Bash
93 lines
2.9 KiB
Bash
|
#!/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
|
|||
|
# -----------------------------------------------------------
|
|||
|
# **********************************************************************************************
|
|||
|
|
|||
|
|