From 8d3057758f9039f02f0ac5bc1dbaa2a86903601c Mon Sep 17 00:00:00 2001 From: clerie <git@clerie.de> Date: Tue, 6 May 2025 21:43:26 +0200 Subject: [PATCH] pkgs/pull-scans: Add script --- pkgs/pull-scans/pull-scan.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 pkgs/pull-scans/pull-scan.sh diff --git a/pkgs/pull-scans/pull-scan.sh b/pkgs/pull-scans/pull-scan.sh new file mode 100755 index 0000000..16de846 --- /dev/null +++ b/pkgs/pull-scans/pull-scan.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +TMP=$(mktemp -d) + +scp "carbon.net.clerie.de:/var/lib/scan-to-gpg/*.asc" "${TMP}" + +find "${TMP}" -iname "*.asc" | gpg --decrypt-files + +find "${TMP}" -mindepth 1 -not -iname "*.asc" -type f | xargs mv -t . + +rm -r "${TMP}"