25 lines
1.2 KiB
Plaintext

--- update.sh.orig Mon Feb 15 17:13:27 1999
+++ update.sh Mon Feb 15 17:14:42 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# This script updates leafnode installations < 1.6
if [ $# -ne 2 ]
@@ -34,13 +34,13 @@
echo Creating new file for main server ...
server=`awk '{ if ($1 == "server") printf("%s\n", substr($0,index($0,"=")+1)); }' < ${LIBDIR}/config | tr -d ' '`
cd ${SPOOLDIR}/interesting.groups
- ls -c1 | xargs -i@@ grep @@\ ${LIBDIR}/groupinfo | \
+ ls -c1 | xargs apply 'grep %1 ${LIBDIR}/groupinfo' | \
cut -d\ -f 1,4 > ${SPOOLDIR}/leaf.node/$server
echo Converting groupinfo file ... your old groupinfo file will be in ${SPOOLDIR}/leaf.node/groupinfo.old
awk '{ printf("%s %d %d 0", $1, $2, $3); for (i = 5; i <= NF; i++) printf(" %s", $i); printf("\n"); }' < ${LIBDIR}/groupinfo > ${SPOOLDIR}/leaf.node/groupinfo
mv ${LIBDIR}/groupinfo ${SPOOLDIR}/leaf.node/groupinfo.old
echo Move other files ...
- find ${LIBDIR} -type f -not -name 'config*' -exec mv '{}' ${SPOOLDIR}/leaf.node/ \;
+ find ${LIBDIR} -type f \! -name 'config*' -exec mv '{}' ${SPOOLDIR}/leaf.node/ \;
chown news.news ${SPOOLDIR}/leaf.node/*
chmod 664 ${SPOOLDIR}/leaf.node/*
echo Done.