From 8171e8677431b360c83e69d383e367386e132f32 Mon Sep 17 00:00:00 2001 From: bie Date: Fri, 4 Aug 2017 06:58:26 +0000 Subject: =?UTF-8?q?refine=20heter=20n=C3=A5=20embed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tears.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tears.cgi b/tears.cgi index 351340b..11dfe6f 100755 --- a/tears.cgi +++ b/tears.cgi @@ -125,9 +125,10 @@ meny() { liste() { n=$((${GET_n:-0} + 7)) finder="$finder -printf '%h\t%TT\t%f\n'" - while read; do - d=$(cut -f 1 <<<"$REPLY") - f=$(cut -f 3 <<<"$REPLY") + #$finder | sort -r | head -$n | tail -7 | while read path; do + while read path; do + d=$(cut -f 1 <<<"$path") + f=$(cut -f 3 <<<"$path") ok=1 [ "$f" ] && kort $d/$f done <<< $(eval $finder | sort -r | head -$n | tail -7) @@ -162,7 +163,8 @@ stikk() { skjema() { [ ! -f "$1" ] && echo "

finner ikke $1:

$(xxd <<<$1)
" && exit [ ! -w "$1" ] && echo "

du har ikke skrivetilgang" && exit - echo "

" + url=$(/opt/bin/pencode <<< $1) + echo "" lupin -f $1 echo "

" echo "" @@ -179,7 +181,7 @@ vis() { [ ! -f "$1" ] && echo "

finner ikke $1:

$(xxd <<<$1)
" && exit [ ! -r "$1" ] && echo "

du har ikke lesetilgang" && exit echo "

" - lupin $1 | /opt/bin/refine + lupin $1 | /opt/bin/embed echo "
" } @@ -217,7 +219,7 @@ oppdater() { lupin -p -e - >$1 irc "$(whoami) redigerte $POST_title" [ -n "$POST_publish" ] && chmod o+r "$1" - # pushd /home/bie/code/maker >/dev/null; ./maker; popd >/dev/null + pushd /home/bie/maker >/dev/null; ./maker; popd >/dev/null redirect "$BASE/rediger/$1" } -- cgit v1.0