summaryrefslogtreecommitdiff
path: root/bin/aux
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2024-04-07 13:25:49 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2024-04-07 13:25:49 +0200
commit9cb56dabb676391a9382731347e8d2b07b9437a5 (patch)
tree95302f041497679202722d9896ec1386bed2d86c /bin/aux
parent0a37a1cc5909e11098963267edc9654b85e7ce16 (diff)
big cleanup
Diffstat (limited to 'bin/aux')
-rwxr-xr-xbin/aux/addwuser.rc33
-rwxr-xr-xbin/aux/bpst.rc64
-rwxr-xr-xbin/aux/gensitemaptxt.rc14
-rwxr-xr-xbin/aux/runtsts.rc16
4 files changed, 0 insertions, 127 deletions
diff --git a/bin/aux/addwuser.rc b/bin/aux/addwuser.rc
deleted file mode 100755
index 9364d39..0000000
--- a/bin/aux/addwuser.rc
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/rc
-
-if(! ~ $#werc_root 0)
- cd $werc_root
-
-fn usage {
- if(! ~ $#* 0)
- echo $0: $* >[1=2]
- echo 'Usage:' $0 'user_name user_password [groups ...]' >[1=2]
- exit usage
-}
-
-if(! test -d etc/users/)
- usage 'Run for root of werc installation or set $werc_root'
-
-user_name=$1
-shift
-user_pass=$1
-shift
-user_groups=$*
-
-if(~ $"user_name '' || ~ $"user_pass '')
- usage
-
-mkdir etc/users/$user_name
-echo $user_pass > etc/users/$user_name/password
-
-if(! ~ $#user_groups 0)
- for(g in $user_groups) {
- mkdir -p etc/users/$g
- echo $user_name >> etc/users/$g/members
- }
-
diff --git a/bin/aux/bpst.rc b/bin/aux/bpst.rc
deleted file mode 100755
index e60d034..0000000
--- a/bin/aux/bpst.rc
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/rc
-
-path=( $PLAN9/bin $path )
-base=.
-
-if(~ $#user 0)
- user=`{whoami}
-
-file=(); title=();
-bloguser=$user
-while(! ~ $#* 0) {
- switch($1) {
- case -u
- base=/gsoc/www/people/$user/blog/
- case -b
- shift
- base=$1
- case -f
- shift
- file=$1
- }
- shift
-}
-
-if(~ $"EDITOR '')
- EDITOR=vi
-
-if(~ $#file 0 || ! test -f $file) {
- file=/tmp/blogtmp.$pid
- rm $file >[2]/dev/null
- touch $file
-}
-
-$EDITOR $file
-ispell $file
-rm $file.bak >[2]/dev/null
-
-fn mkbpost {
- umask 002 # Let group write
- bptext=$1
- if(! ~ $#2 0)
- bpid=`{echo -n '-'^$"bpid | sed 's/'$forbidden_uri_chars'+/_/g; 1q'}
- d=`{/bin/date +%F|sed 's,-,/,g'}
-
- ddir=$blagh_root^$d^'/'
- n=`{ls $ddir >[2]/dev/null |wc -l}
-
- mkdir -p $ddir/$"n^$"bpid/
- {
- # TODO: Enable metadata
- #echo '* Posted:' `{date}
- #if(! ~ $#logged_user 0)
- # echo '* Author: '$logged_user
- cat $bptext
- }> $ddir/$"n^$"bpid/index.md
-}
-
-forbidden_uri_chars='[^a-zA-Z0-9_+\-\/\.]'
-blagh_root=$base
-
-if(test -s $file)
- mkbpost $file
-if not
- echo Empty file!
diff --git a/bin/aux/gensitemaptxt.rc b/bin/aux/gensitemaptxt.rc
deleted file mode 100755
index a1b349d..0000000
--- a/bin/aux/gensitemaptxt.rc
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/rc
-# DEPRECATED: sitemap.tpl now generates and updates a sitemap.txt when requested, and is also more smart than this simplistic script.
-
-for(d in sites/*/) {
-echo $d
-9 du -a $d | awk '/\.(md|html)$/ { print $2 }; {}' | 9 sed -e 's/\.(md|html)$//' -e 's,/index$,/,' -e 's,^sites/,http://,' > $d/sitemap.txt
-
-if(! test -f $d/robots.txt) {
- echo generating missing robots.txt for $d
- echo $d|sed 's,sites/,Sitemap: http://,; s/$/sitemap.txt/;' > $d/robots.txt
- cat $d/robots.txt
-}
-
-}
diff --git a/bin/aux/runtsts.rc b/bin/aux/runtsts.rc
deleted file mode 100755
index b5b1df7..0000000
--- a/bin/aux/runtsts.rc
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/rc
-
-tstdom='http://test.cat-v.org'
-
-cd sites/tst.cat-v.org
-
-tstfiles=`{du -a |awk '/\.tst$/ { print $2 }; {} ' | sed 's/^\.//; s/\.tst$//'}
-
-for(f in $tstfiles) {
- ifs='
-' { tsts=`{cat ./$f.tst} }
-
- for(t in $tsts) {
- echo tst $t
- }
-}