diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2023-05-17 15:32:05 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2023-05-17 15:32:05 -0300 |
commit | cc5b1435960222049ada99d01b6a5c17b97018ec (patch) | |
tree | 1eb26f46bd96573d793a4872e569376558f9a4c5 | |
parent | 6f05e7025dd1abf8c6b3a59382e798d79c23e3e6 (diff) | |
download | trashman-cc5b1435960222049ada99d01b6a5c17b97018ec.tar.gz trashman-cc5b1435960222049ada99d01b6a5c17b97018ec.tar.bz2 |
Feat: trashman_apt_install(): support for arbitrary keyring folders
-rw-r--r-- | share/trashman/trashman/debian | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/share/trashman/trashman/debian b/share/trashman/trashman/debian index db737ff..78514ae 100644 --- a/share/trashman/trashman/debian +++ b/share/trashman/trashman/debian @@ -53,13 +53,18 @@ trashman_apt_install() { trashman_install_apt_key() { local orig="$1" local dest="$2" + local base_dest="$3" if [ ! -e "$orig" ]; then exit 1 fi - $SUDO cp $orig /etc/apt/trusted.gpg.d/$dest || exit 1 - $SUDO chown root.root /etc/apt/trusted.gpg.d/$dest && $SUDO chmod 644 /etc/apt/trusted.gpg.d/$dest || exit 1 + if [ -z "$base_dest" ]; then + base_dest="/etc/apt/trusted.gpg.d" + fi + + $SUDO cp $orig $base_dest/$dest || exit 1 + $SUDO chown root.root $base_dest/$dest && $SUDO chmod 644 $base_dest/$dest || exit 1 } # Determine Debian major version name |