68 lines
1.6 KiB
Bash
68 lines
1.6 KiB
Bash
|
#!/bin/sh
|
|||
|
|
|||
|
if [ -z $1 ];then
|
|||
|
echo "kullanım: $0 > index.html"
|
|||
|
exit 1
|
|||
|
fi
|
|||
|
|
|||
|
paketdepo="http://paketler.milislinux.org"
|
|||
|
dosya=/tmp/paket_konumlar
|
|||
|
[ -f $dosya ] && rm -rf $dosya
|
|||
|
find /root/talimatname/temel/* -type d > $dosya
|
|||
|
find /root/talimatname/genel/*/* -type d >> $dosya
|
|||
|
|
|||
|
echo "<html>"
|
|||
|
echo '<meta http-equiv="content-type" contentType="text/html; charset=UTF-8">'
|
|||
|
echo '<meta charset="UTF-8">'
|
|||
|
echo '<link rel="stylesheet" href="bootstrap.min.css" />'
|
|||
|
echo '<table class="table" border=1>'
|
|||
|
echo '<thead class="thead-dark">'
|
|||
|
echo '<tr>'
|
|||
|
echo '<th scope="col">Grup</th>'
|
|||
|
echo '<th scope="col">isim</th>'
|
|||
|
echo '<th scope="col">Sürüm</th>'
|
|||
|
echo '<th scope="col">Açıklama</th>'
|
|||
|
echo '<th scope="col">Url</th>'
|
|||
|
echo '<th scope="col">Paket Adresi</th>'
|
|||
|
echo '</tr>'
|
|||
|
echo '</thead>'
|
|||
|
|
|||
|
echo '<tbody>'
|
|||
|
|
|||
|
while IFS='' read -r konum || [[ -n "$konum" ]]; do
|
|||
|
|
|||
|
echo "<tr>"
|
|||
|
|
|||
|
# Grup
|
|||
|
grup=$(grep -ri "# Grup:" $konum/talimat | cut -d ':' -f2-)
|
|||
|
echo "<td>$grup</td>"
|
|||
|
|
|||
|
# İsim
|
|||
|
isim=$(basename $konum)
|
|||
|
echo "<td>$isim</td>"
|
|||
|
|
|||
|
# Surum-Devir
|
|||
|
surum=$(grep -ri ^"surum=" $konum/talimat | cut -d '=' -f2-)
|
|||
|
devir=$(grep -ri ^"devir=" $konum/talimat | cut -d '=' -f2-)
|
|||
|
echo "<td>$surum-$devir</td>"
|
|||
|
|
|||
|
# Tanım
|
|||
|
tanim=$(grep -ri "# Tanım:" $konum/talimat | cut -d ':' -f2-)
|
|||
|
echo "<td>$tanim</td>"
|
|||
|
|
|||
|
# Url
|
|||
|
url=$(grep -ri "# Url:" $konum/talimat | cut -d ':' -f2-)
|
|||
|
echo "<td><a href=$url>$url</a></td>"
|
|||
|
|
|||
|
# İndir
|
|||
|
echo "<td><a href=${paketdepo}/${isim}%23${surum}-x86_64.mps.lz>indir</a></td>"
|
|||
|
# %23 = #
|
|||
|
|
|||
|
echo "</tr>"
|
|||
|
done < "$dosya"
|
|||
|
|
|||
|
echo '</tbody>'
|
|||
|
echo "</table>"
|
|||
|
echo "</htlm>"
|
|||
|
|