Command - diff
diff --git a/.index b/.index
index 84442f4..fa24c4c 100755
--- a/.index
+++ b/.index
@@ -25,8 +25,14 @@ if [[ ! -z "$1" ]]; then
e) shift; . ./.exec $@; exit;;
~*) . ./.tilde $@; exit;;
*)
- path=$DOCUMENT_ROOT/htdocs/`echo $@ | tr ' ' '/'`
- [[ -f $path ]] || NotFound
+ path=$DOCUMENT_ROOT/htdocs/$DOCUMENT_URI
+ if [[ ! -f $path ]]; then
+ [[ ! -z "$REMOTE_USER" ]] || NotFound
+ path=$DOCUMENT_ROOT/home/$REMOTE_USER/$DOCUMENT_URI
+ # check perms (not applicable, for now)
+ # ls -al $path | awk '{print $1}' | tail -c 4 | grep -q r
+ [[ -f $path ]] || NotFound
+ fi
echo Status 200: Ok
echo
cat $path
diff --git a/.install_bin b/.install_bin
index 0164f2f..020a83f 100644
--- a/.install_bin
+++ b/.install_bin
@@ -63,3 +63,5 @@ chmod
tar
uniq
uniq
+man
+chown
diff --git a/.register b/.register
index 464dcaa..a5ceea8 100644
--- a/.register
+++ b/.register
@@ -48,8 +48,8 @@ fmkdir $USER_DIR
echo $email | fwrite $USER_DIR/email
echo $username:$password | htpasswd -I $ROOT/.htpasswd
rand_str="`rand_str_1`"
-echo "$rand_str" | fwrite $USER_DIR/rcode
-femail -f noreply@tty.pt $email <<!
+echo "$rand_str" | fwrite $USER_DIR/rcode2
+femail -f noreply@tty.pt $email 2>&1 <<!
Subject: `_ "Registration on tty.pt"`
`_ "Welcome to tty.pt!"`
diff --git a/nd b/nd
index fdf881d..62b6933 160000
--- a/nd
+++ b/nd
@@ -1 +1 @@
-Subproject commit fdf881d3979f7704f7ce35ea82af221e3afdfee2
+Subproject commit 62b693384a6100031413eabe823b249a134379df
diff --git a/poem/.index b/poem/.index
index f61647a..4c86d16 100644
--- a/poem/.index
+++ b/poem/.index
@@ -14,6 +14,6 @@ if [[ ! -z "$REMOTE_USER" ]]; then
export POEM_ADD="<a class=\"$RB\" href=\"/poem/add\">+</p>"
fi
-export POEMS="`ls_shown $ROOT/poems | BigButtons poem`"
+export POEMS="`ls_shown $ROOT/poem | BigButtons poem`"
Normal 200 poem
Scat .template/index