[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 1a178ef1 1/6: Add a script to upload to savan
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 1a178ef1 1/6: Add a script to upload to savannah |
Date: |
Sun, 5 Jun 2022 20:09:59 -0400 (EDT) |
branch: master
commit 1a178ef18b6354615571f9a081d87aa01442d405
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Add a script to upload to savannah
The new script requires 'gpg'; 'gnupg' is the canonical debian package.
---
lmi_setup_20.sh | 1 +
publish.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/lmi_setup_20.sh b/lmi_setup_20.sh
index c3df8611..cfc2ac55 100755
--- a/lmi_setup_20.sh
+++ b/lmi_setup_20.sh
@@ -87,6 +87,7 @@ apt-get --assume-yes install \
g++-multilib \
gdb \
git \
+ gnupg \
jing \
libarchive-tools \
libc6-dbg \
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 00000000..6ceca15a
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Upload a file.
+
+# Copyright (C) 2022 Gregory W. Chicares.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+#
+# https://savannah.nongnu.org/projects/lmi
+# email: <gchicares@sbcglobal.net>
+# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+set -x
+
+if [ "greg" != "$(whoami)" ]; then
+ exit 0
+fi
+
+if [ "$#" -ne 1 ]; then
+ printf '%s arguments given, but exactly one expected.\n' "$#"
+ exit 2
+fi
+
+filepath="$(readlink --canonicalize "$1")"
+
+if [ ! -f "$filepath" ]; then
+ printf 'No such file "%s"--exiting.\n' "$1"
+ exit 3
+fi
+
+gpg --local-user gchicares@sbcglobal.net --detach-sign "$filepath"
+chmod 644 "$filepath" "$filepath.sig"
+cd "$(dirname "$filepath")" || { printf 'fail: cd\n'; exit 4; }
+rsync -vv \
+ "$(basename "$filepath")" \
+ "$(basename "$filepath.sig")" \
+ chicares@dl.sv.nongnu.org:/releases/lmi/
- [lmi-commits] [lmi] master updated (06e5af60 -> a0472892), Greg Chicares, 2022/06/05
- [lmi-commits] [lmi] master 1a178ef1 1/6: Add a script to upload to savannah,
Greg Chicares <=
- [lmi-commits] [lmi] master 742d7a71 2/6: Refactor, Greg Chicares, 2022/06/05
- [lmi-commits] [lmi] master 4c7f90b8 3/6: Prepare to use bsdtar, Greg Chicares, 2022/06/05
- [lmi-commits] [lmi] master 914bc153 4/6: Archive a fardel using another format, Greg Chicares, 2022/06/05
- [lmi-commits] [lmi] master 496381cf 5/6: Customize and publish a fardel, Greg Chicares, 2022/06/05
- [lmi-commits] [lmi] master a0472892 6/6: Document $(build_type) in a more general way, Greg Chicares, 2022/06/05