aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xadmin/populate-boneyard34
1 files changed, 22 insertions, 12 deletions
diff --git a/admin/populate-boneyard b/admin/populate-boneyard
index d24e30d..7f16b9e 100755
--- a/admin/populate-boneyard
+++ b/admin/populate-boneyard
@@ -16,6 +16,11 @@ CLONEURL=git://git.slackbuilds.org/slackbuilds.git
START_COMMIT=15.0-20220311.1
SLACKVER="$( echo $START_COMMIT | cut -d- -f1 )"
+# sshfs URL for web server
+SSHFS_REMOTE=sluk:/home/urchlay/public_html/html/boneyard/
+# local sshfs mountpoint
+SSHFS_MNTPNT=/home/urchlay/boneyard-remote
+
# during script development/testing, set this to make
# test runs faster (but very incomplete of course):
#DEBUG_LIMIT="-n 10"
@@ -62,6 +67,7 @@ mktarball() {
echo " - tarball and .desc already exist"
desc="$( cat $descfile )"
else
+ new_tarballs+="$tarball "
git checkout $tarcommit
( cd $categ ; tar cvfz $tarball $prg )
desc="$( grep "^$prg: " $catprg/slack-desc | head -n 1 | cut -d: -f2 )"
@@ -164,18 +170,22 @@ EOF
mv $OUTFILE.new $OUTFILE
-echo
-echo "If everything's OK:"
-echo
-echo "rsync -r -v -e ssh $OUTDIR sluk:/home/urchlay/public_html/html/boneyard/"
-
-# Tarball contents will be a regular SBo tarball.
+if [ ! -e $SSHFS_MNTPNT/.sshfs.mounted ]; then
+ mkdir -p $SSHFS_MNTPNT
+ sshfs $SSHFS_REMOTE $SSHFS_MNTPNT
+ touch $SSHFS_MNTPNT/.sshfs.mounted
+fi
-# Output should show...
+# unconditionally copy the index.html
+echo
+echo "copying index.html"
+cp $OUTDIR/index.html $SSHFS_MNTPNT
-# category/build (<size>KB) category-build.tar.gz
-# Removed YYYYMMDD (hash): log msg
-# Last updated YYYYMMDD (hash): log msg
+if [ "$new_tarballs" = "" ]; then
+ echo "no newly created tarballs to copy"
+ exit 0
+fi
-# *Don't* show maintainer name/email. If someone wants to know,
-# let them download the tarball.
+echo "copying $( echo $new_tarballs | wc -w ) new tarballs"
+cd $OUTDIR
+cp -v $new_tarballs $SSHFS_MNTPNT