From 193590ce4d657647f91b2eaa74350b840f174d8d Mon Sep 17 00:00:00 2001 From: milisbir Date: Wed, 17 Oct 2018 00:19:10 +0300 Subject: [PATCH] talimatname-indeksleme --- bin/talimatname_indeks.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/talimatname_indeks.sh b/bin/talimatname_indeks.sh index 3b68806e8..6a2b5840b 100755 --- a/bin/talimatname_indeks.sh +++ b/bin/talimatname_indeks.sh @@ -1,11 +1,9 @@ #!/bin/sh - -if [ -z $1 ];then - echo "kullanım: $0 > index.html" - exit 1 -fi +# Bu betik talimatnamede yer alan talimatları web sayfası sunumu için indeksler. +# Kullanım: talimatname_indeks.sh > index.html paketdepo="http://paketler.milislinux.org" +#paketdepo="http://127.0.0.1:8000" dosya=/tmp/paket_konumlar [ -f $dosya ] && rm -rf $dosya find /root/talimatname/temel/* -type d > $dosya @@ -24,6 +22,7 @@ echo 'Sürüm' echo 'Açıklama' echo 'Url' echo 'Paket Adresi' +echo 'Son Güncelleme' echo '' echo '' @@ -55,9 +54,14 @@ while IFS='' read -r konum || [[ -n "$konum" ]]; do echo "$url" # İndir - echo "indir" + purl="${paketdepo}/${isim}%23${surum}-x86_64.mps.lz" + echo "indir" # %23 = # + # Güncelleme Tarih + gtarih=$(curl -s -v -X HEAD $purl 2>&1 | grep '^< Last-Modified:' | cut -d':' -f2-) + echo "$gtarih" + echo "" done < "$dosya"