From 62f6e327360798f313b53ab1afd811c8c80e7c8e Mon Sep 17 00:00:00 2001 From: "Scott C. MacCallum" Date: Fri, 24 Feb 2023 14:15:35 +0000 Subject: [PATCH] Many changes to fix Gemini and remove control characters --- ...eb-to-other.ksh => cluster-web-to-other.sh | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) rename cluster-web-to-other.ksh => cluster-web-to-other.sh (69%) diff --git a/cluster-web-to-other.ksh b/cluster-web-to-other.sh similarity index 69% rename from cluster-web-to-other.ksh rename to cluster-web-to-other.sh index 4b2282f..3b27403 100755 --- a/cluster-web-to-other.ksh +++ b/cluster-web-to-other.sh @@ -1,4 +1,4 @@ -#/bin/ksh +#/bin/sh month=$(date '+%m') year=$(date '+%Y') @@ -40,26 +40,38 @@ sed -i '1d;2d;3d' /sdf/arpa/ns/s/scm/index sed -i '1d;2d;3d' /sdf/arpa/ns/s/scm/$month +# Remove the control characters from the index file + +cat /sdf/arpa/ns/s/scm/index | col -b -x > /sdf/arpa/ns/s/scm/index.sdf + +# Remove the control characters from the posts file + +cat /sdf/arpa/ns/s/scm/$month | col -b -x > /sdf/arpa/ns/s/scm/$month.sdf + +# Remove the control characters from the footer file + +cat /sdf/arpa/ns/s/scm/footer | col -b -x > /sdf/arpa/ns/s/scm/footer.sdf + # Write the posts text file to the .plan cluster text file # Change the head number as needed when the index.html file is changed -head -n 10 index > /sdf/arpa/ns/s/scm/header +head -n 10 index.sdf > /sdf/arpa/ns/s/scm/header -cat /sdf/arpa/ns/s/scm/$month > body +cat /sdf/arpa/ns/s/scm/$month.sdf > body cat /sdf/arpa/ns/s/scm/header > /sdf/arpa/ns/s/scm/.plan cat /sdf/arpa/ns/s/scm/body >> /sdf/arpa/ns/s/scm/.plan -cat /sdf/arpa/ns/s/scm/footer >> /sdf/arpa/ns/s/scm/.plan +cat /sdf/arpa/ns/s/scm/footer.sdf >> /sdf/arpa/ns/s/scm/.plan # Write the index text file to the root directory of Gopher -cp /sdf/arpa/ns/s/scm/index /ftp/pub/users/scm +cp /sdf/arpa/ns/s/scm/index.sdf /ftp/pub/users/scm/index # Write the posts text file to the posts directory of Gopher -cp /sdf/arpa/ns/s/scm/$month /ftp/pub/users/scm/posts/$year +cp /sdf/arpa/ns/s/scm/$month.sdf /ftp/pub/users/scm/posts/$year/$month # Set the proper Gopher directory permissions @@ -69,16 +81,10 @@ chmod -R 754 /ftp/pub/users/scm # Meta Array # -cat /sdf/arpa/ns/s/scm/.plan | col -b -x > /sdf/arpa/ns/s/scm/.plan.ma +scp /sdf/arpa/ns/s/scm/.plan scm@ma.sdf.org:/meta/s/scm -scp /sdf/arpa/ns/s/scm/.plan.ma scm@ma.sdf.org:/meta/s/scm/.plan +scp /sdf/arpa/ns/s/scm/index.sdf scm@ma.sdf.org:/meta/gemini/scm/index.gmi -cat /sdf/arpa/ns/s/scm/index | col -b -x > /sdf/arpa/ns/s/scm/index.ma - -scp /sdf/arpa/ns/s/scm/index.ma scm@ma.sdf.org:/meta/gemini/scm/index.gmi - -cat /sdf/arpa/ns/s/scm/$month | col -b -x > /sdf/arpa/ns/s/scm/$month.ma - -scp /sdf/arpa/ns/s/scm/$month.ma scm@ma.sdf.org:/meta/gemini/scm/posts/$year/$month.gmi +scp /sdf/arpa/ns/s/scm/$month.sdf scm@ma.sdf.org:/meta/gemini/scm/posts/$year/$month.gmi exit 0