talimat.py
This commit is contained in:
parent
30dda40025
commit
d39f9adfae
1 changed files with 9 additions and 3 deletions
|
@ -103,13 +103,11 @@ class Talimat():
|
||||||
continue
|
continue
|
||||||
if blok and satir.rstrip()!="" and satir.rstrip()!="}":
|
if blok and satir.rstrip()!="" and satir.rstrip()!="}":
|
||||||
if (satir not in self.derleme) and ("pkgver()" not in satir) and ("prepare()" not in satir) and ("build()" not in satir) and ("package()" not in satir):
|
if (satir not in self.derleme) and ("pkgver()" not in satir) and ("prepare()" not in satir) and ("build()" not in satir) and ("package()" not in satir):
|
||||||
'''
|
|
||||||
satir=satir.replace("pkgdir","PKG")
|
satir=satir.replace("pkgdir","PKG")
|
||||||
satir=satir.replace("srcdir","SRC")
|
satir=satir.replace("srcdir","SRC")
|
||||||
satir=satir.replace("pkgname","name")
|
satir=satir.replace("pkgname","name")
|
||||||
satir=satir.replace("pkgver","version")
|
satir=satir.replace("pkgver","version")
|
||||||
satir=satir.replace("pkgrel","release")
|
satir=satir.replace("pkgrel","release")
|
||||||
'''
|
|
||||||
self.derleme+=satir+"\n"
|
self.derleme+=satir+"\n"
|
||||||
else:
|
else:
|
||||||
return "blok için gecersiz tip!"
|
return "blok için gecersiz tip!"
|
||||||
|
@ -317,10 +315,15 @@ class Arge:
|
||||||
if e.code == 404:
|
if e.code == 404:
|
||||||
print renk.hata+link+" bulunamadı!"+renk.son
|
print renk.hata+link+" bulunamadı!"+renk.son
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def aur_link(self,paket):
|
def aur_link(self,paket):
|
||||||
link="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h="+paket
|
link="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h="+paket
|
||||||
return link
|
return link
|
||||||
|
|
||||||
|
def arch_link(self,paket):
|
||||||
|
link="https://git.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/"+paket
|
||||||
|
return link
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
|
@ -338,6 +341,9 @@ if __name__ == '__main__':
|
||||||
paket=str(paket)
|
paket=str(paket)
|
||||||
link=arge.aur_link(paket)
|
link=arge.aur_link(paket)
|
||||||
dosya=arge.indir(link)
|
dosya=arge.indir(link)
|
||||||
|
if dosya is None:
|
||||||
|
link=arge.arch_link(paket)
|
||||||
|
dosya=arge.indir(link)
|
||||||
if link and dosya:
|
if link and dosya:
|
||||||
talimat.cevir(dosya)
|
talimat.cevir(dosya)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue