shithub: sirjofri_de

Download patch

ref: ff639e8ab3e1a0fb72631f98ad1a049c266ddcf2
parent: 7358db8b9094ebec12a031e83f4dd1d45b53a6dd
author: sirjofri <sirjofri@sirjofri.de>
date: Mon Jan 3 15:14:27 EST 2022

removes "files" -> moved to /usr/public

diff: cannot open a/pub/files/9front/rc//null: file does not exist: 'a/pub/files/9front/rc//null' diff: cannot open a/pub/files/9front//null: file does not exist: 'a/pub/files/9front//null' diff: cannot open a/pub/files/9gridchan//null: file does not exist: 'a/pub/files/9gridchan//null' diff: cannot open a/pub/files/guidedreplica//null: file does not exist: 'a/pub/files/guidedreplica//null' diff: cannot open a/pub/files//null: file does not exist: 'a/pub/files//null'
--- a/pub/files/.htaccess
+++ /dev/null
@@ -1,11 +1,0 @@
-Options +Indexes
-IndexOptions FancyIndexing
-IndexOptions NameWidth=30 DescriptionWidth=450 IconHeight=16 IconWidth=16 FoldersFirst ScanHTMLTitles SuppressHTMLPreamble
-IndexOptions Charset=UTF-8
-IndexIgnore head.html foot.html
-HeaderName /files/head.html
-ReadmeName /files/foot.html
-
-AddDescription "easy/simple replica(1) wizard" guidedreplica
-AddDescription "9gridchan scripts (9gridchan.org)" 9gridchan
-AddDescription "9front tools and applications" 9front
--- a/pub/files/9front/.htaccess
+++ /dev/null
@@ -1,1 +1,0 @@
-AddDescription "rc scripts" rc
--- a/pub/files/9front/rc/.htaccess
+++ /dev/null
@@ -1,5 +1,0 @@
-AddDescription "fill this directory with a mkfile template (many C files)" mkmanymk
-AddDescription "fill this directory with a mkfile template (one C file)" mkonemk
-AddDescription "invoke google translator. echo text | trans en de" trans
-AddDescription "fill this directory with an empty wikifs" mkwikifs
-AddDescription "snarfs the path to the file (or text if no file exists)" snarf
--- a/pub/files/9front/rc/mkmanymk
+++ /dev/null
@@ -1,27 +1,0 @@
-#!/bin/rc
-
-fn stubfile{
-	echo '#include <u.h>
-#include <libc.h>
-
-void
-main(int argc, char **argv)
-{
-}' > $1.c	
-}
-
-if(~ $#* 0){
-	names=`{basename `{pwd}}
-}
-if not{
-	names=$*
-}
-
-for(i in $names)
-	stubfile $i
-
-echo '</$objtype/mkfile
-
-TARG='^$"names^'
-
-</sys/src/cmd/mkmany' > mkfile
--- a/pub/files/9front/rc/mkonemk
+++ /dev/null
@@ -1,23 +1,0 @@
-#!/bin/rc
-
-if(~ $1 ''){
-	name=`{basename `{pwd}}
-}
-if not{
-	name=$1
-}
-
-echo '#include <u.h>
-#include <libc.h>
-
-void
-main(int argc, char **argv)
-{
-}' > $name.c
-
-echo '</$objtype/mkfile
-
-TARG='$name'
-OFILES='$name'.$O
-
-</sys/src/cmd/mkone' > mkfile
--- a/pub/files/9front/rc/mkwikifs
+++ /dev/null
@@ -1,14 +1,0 @@
-#!/bin/rc
-
-echo 'TITLE
-
-PAGE' > page.txt
-
-mkdir d
-
-echo '1 start' > d/map
-echo 'Start
-D'`{date -n}'
-A'`{cat /env/user}'
-#empty page
-#' > d/1
--- a/pub/files/9front/rc/snarf
+++ /dev/null
@@ -1,15 +1,0 @@
-#!/bin/rc
-
-fn usage{
-	echo 'usage: '^`{basename $0}^' file' >[1=2]
-	exit usage
-}
-
-if(~ $#1 0)
-	usage $0;
-
-if(! test -f $1){
-	echo -n $1 >/dev/snarf
-	exit
-}
-echo -n `{pwd}^'/'^$1 >/dev/snarf
--- a/pub/files/9front/rc/trans
+++ /dev/null
@@ -1,12 +1,0 @@
-#!/bin/rc
-
-if(! ~ $#* 2)
-	exit 'usage'
-
-sourcelang=$1
-targetlang=$2
-
-text=`{cat}
-send=`{echo $"text | urlencode}
-
-hget 'https://translate.googleapis.com/translate_a/single?client=gtx&sl='^$sourcelang^'&tl='^$targetlang^'&dt=t&q='^$"send | sed 1q | sed 's/^\[\[\["//;s/\",\".*$//g'
--- a/pub/files/9gridchan/.htaccess
+++ /dev/null
@@ -1,1 +1,0 @@
-AddDescription "gridstart alternative: cleaner, smaller, quiet mode" griddy
--- a/pub/files/9gridchan/griddy
+++ /dev/null
@@ -1,55 +1,0 @@
-#!/bin/rc
-
-flagfmt='t:tls,p:pub,q:quiet'
-
-if(! ifs=() eval `{aux/getflags $*}){
-	aux/usage
-	echo ' -t  prefer tls
- -p  mount pubregistry services
- -q  quiet. Don''t ask, just do.' >[1=2]
-	exit usage
-}
-
-# remove old services
-test -e /srv/gridregistry && {
-	if(~ $quiet 1) ans=n
-	if not{
-		echo 'old grid connections found in /srv, remove? (y/n)'
-		ans=`{read}
-	}
-	if(~ $ans y){
-		echo 'removing old'
-		rm /srv/gridchat
-		rm /srv/gridplumber
-		rm /srv/gridram
-		rm /srv/gridregistry
-		rm /srv/gridroot
-		rm /srv/gridwiki
-		rm /srv/griddisk
-		rm /srv/pubregistry
-	}
-}
-
-# mount grid services (from registry)
-~ $tls 1 && {
-	echo 'mount services (tls)'
-	test -r /mnt/factotum/ctl || auth/factotum -n
-	echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-	srvtls tcp!registry.9gridchan.org!16675 gridregistry /mnt/registry
-	awk '/tlssrv/{print "srvtls -c", $1, $3, $5}' /mnt/registry/index | rc
-}
-~ $tls 1 || {
-	echo 'mount services (no tls)'
-	srv tcp!registry.9gridchan.org!6675 gridregistry /mnt/registry
-	awk '/exportfs/{print "srv -c", $1, $3, $5}' /mnt/registry/index | rc
-}
-
-# mount public grid services (from pubregistry)
-~ $pub 1 && {
-	echo 'mount public services (pubregistry)'
-	test -r /n/pubregistry/index || { echo 'pubregistry not found' >[1=2] }
-	test -r /n/pubregistry/index && {
-		awk '/tlssrv/{print "srvtls -c", $1, $3, $5}' /n/pubregistry/index
-		awk '/exportfs/{print "srv -c", $1, $3, $5}' /n/pubregistry/index
-	} | rc
-}
--- a/pub/files/guidedreplica/.htaccess
+++ /dev/null
@@ -1,2 +1,0 @@
-AddDescription "how to use guided replica" README
-AddDescription "guided replica script" guidedreplica.rc
--- a/pub/files/guidedreplica/README
+++ /dev/null
@@ -1,7 +1,0 @@
-USAGE
-
-Bind your server $home to /n/rserver and your client $home to
-/n/rclient.  Then run guidedreplica.rc
-
-Enter your servername (name only, no port).  If you need to make
-deeper adjustments do that after the script finishes.
--- a/pub/files/guidedreplica/guidedreplica.rc
+++ /dev/null
@@ -1,177 +1,0 @@
-#!/bin/rc
-
-echo Make sure that:
-echo '  - server home is mounted at /n/rserver'
-echo '  - client home is mounted at /n/rclient'
-echo you can do that with bind/rimport, e. g.
-echo '  bind $home /n/rclient'
-echo '  rimport $servername $home /n/rserver'
-echo
-echo Abort now if you still need to do that! '(Del/Enter)'
-read
-
-while(~ $#servername 0 || ~ $servername ''){
-	echo Enter your server name '(ndb compatible).'
-	echo -n 'servername (no default): '
-	servername=`{read}
-}
-
-if(~ $#helperscripts 0 || ~ $helperscripts ''){
-	echo Enter the path to the helper scripts.
-	echo These helper scripts can help you using replica.
-	echo -n 'helperscripts ($home/bin/rc/replica): '
-	helperscripts=`{read}
-	if(~ $#helperscripts 0 || ~ $helperscripts '')
-		helperscripts=$home/bin/rc/replica
-}
-
-servicefile='servername='^$servername^'
-
-fn servermount{
-	echo servermount $sysname
-	if(~ $sysname $servername)
-		bind / /n/rserver
-	if not
-		rimport $servername / /n/rserver
-}
-fn serverupdate{
-	echo serverupdate $sysname
-	if(~ $sysname $servername)
-		replica/scan -v $servername
-	if not
-		rcpu -h $servername -c replica/scan -v $servername
-}
-serverroot=/n/rserver
-s=/n/rserver/lib/rep
-serverlog=$s/server.log
-serverproto=$s/server.proto
-serverdb=$s/server.db
-
-fn clientmount{
-	echo clientmount $sysname
-	if(~ $sysname $servername)
-		bind /mnt/term/usr/$user /n/rclient
-	if not
-		bind / /n/rclient
-}
-clientroot=/n/rclient
-c=/n/rclient/lib/rep
-clientlog=$c/client.log
-clientproto=$c/client.proto
-clientdb=$c/client.db
-clientexclude=()'
-
-creplica=/n/rclient/lib/replica
-crep=/n/rclient/lib/rep
-sreplica=/n/rserver/lib/replica
-srep=/n/rserver/lib/rep
-
-mkdir -p $creplica
-mkdir -p $crep
-mkdir -p $sreplica
-mkdir -p $srep
-
-echo $servicefile > $creplica/$servername
-echo $servicefile > $sreplica/$servername
-
-echo
-echo Created files
-echo '    ' $creplica/$servername
-echo ' and' $sreplica/$servername
-echo please adjust them and make sure that they are the same.
-
-touch $crep/^(client.proto client.log client.db)
-touch $srep/^(server.proto server.log server.db)
-
-# install helperscripts
-mkdir -p $helperscripts
-
-echo '#!/bin/rc
-
-fn usage{
-	echo ''usage: reproto -s|-c server'' >[1=2]
-	exit ''usage''
-}
-
-if(! ~ $#* 2)
-	usage
-
-if(! test -r $home/lib/replica/$2)
-	usage
-
-. $home/lib/replica/$2
-
-clientmount
-servermount
-
-switch($1){
-case -c
-{
-	echo using client proto
-	cp $clientproto $serverproto
-}
-case -s
-{
-	echo using server proto
-	cp $serverproto $clientproto
-}
-case *
-	usage
-}' >$helperscripts/reproto
-
-echo '#!/bin/rc
-
-fn usage{
-	echo ''usage: reupdate server file...'' >[1=2]
-	exit ''usage''
-}
-
-if(test $#* -lt 2)
-	usage
-
-server=$1
-
-rfork
-ramfs
-
-nl=''
-''
-
-. /usr/$user/lib/replica/$server
-
-servermount
-clientmount
-
-shift
-
-todelete=''''
-
-while(! ~ $#* 0){
-	todelete=$todelete^''s:''^$1^'':########:g;''
-
-	shift
-}
-
-todelete=$todelete^''/########/d''
-
-userverdb=`{
-	basename -d $serverdb | tr -d $nl
-	echo -n /_
-	basename $serverdb | tr -d $nl
-}
-
-sed $todelete $clientlog > /tmp/clientlog
-sed $todelete $clientdb > /tmp/clientdb
-sed $todelete $serverlog > /tmp/serverlog
-sed $todelete $serverdb >/tmp/serverdb
-sed $todelete $userverdb >/tmp/userverdb
-cp /tmp/clientlog $clientlog
-cp /tmp/clientdb $clientdb
-cp /tmp/serverlog $serverlog
-cp /tmp/serverdb $serverdb
-cp /tmp/userverdb $userverdb
-
-echo replica/push $server' >$helperscripts/reupdate
-
-# clean up
-rm /env/servername /env/helperscripts
--- a/pub/files/head.html
+++ /dev/null
@@ -1,26 +1,0 @@
-<!doctype html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta name="description" content="my personal website with changeblog and shared resources">
-<title>sirjofri • files</title>
-<style type="text/css">
-body {
-	font-family: sans-serif;
-	max-width: 960px;
-	margin: auto;
-	padding: 10px;
-}
-</style>
-</head>
-<body>
-<header>
-<h1>files</h1>
-<nav>
-<a href="/">start</a> •
-<a href="/changeblog/">changeblog</a> •
-<a href="/files/">files</a>
-</nav>
-</header>
-<main>