Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
0f5c6dbb
Kaydet (Commit)
0f5c6dbb
authored
Tem 07, 2005
tarafından
S.Çağlar Onur
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pisi-cli 2 ayrı yerde aynı dosya olarak duruyordu. Kozmetik değişiklik
üst
8b5c411d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
111 deletions
+1
-111
configfile.py
pisi/configfile.py
+1
-1
pisi-cli
pisi/pisi-cli
+0
-110
No files found.
pisi/configfile.py
Dosyayı görüntüle @
0f5c6dbb
...
...
@@ -22,7 +22,7 @@ class ConfigException(Exception):
class
GeneralDefaults
:
"""Default values for [general] section"""
destinationdirectory
=
os
.
getcwd
()
+
"/tmp"
# FOR ALPHA
destinationdirectory
=
os
.
getcwd
()
+
"/tmp"
# FOR ALPHA
class
BuildDefaults
:
"""Default values for [build] section"""
...
...
pisi/pisi-cli
deleted
100755 → 0
Dosyayı görüntüle @
8b5c411d
#!/usr/bin/python
# -*- coding: utf-8 -*-
import
sys
from
optparse
import
OptionParser
import
pisi
from
pisi.cli
import
buildhelper
,
installhelper
,
indexhelper
usage
=
"""
%
prog COMMAND [ARGUMENTS] [options]
Where commands are bla bla...
"""
class
PisiCLI
(
object
):
def
__init__
(
self
):
parser
=
OptionParser
(
usage
=
usage
,
version
=
"
%
prog "
+
pisi
.
__version__
)
parser
.
add_option
(
"-D"
,
"--destdir"
,
action
=
"store"
)
parser
.
add_option
(
"-u"
,
"--username"
,
action
=
"store"
)
parser
.
add_option
(
"-p"
,
"--password"
,
action
=
"store"
)
parser
.
add_option
(
"-P"
,
action
=
"store_true"
,
dest
=
"getpass"
,
default
=
False
,
help
=
"Get password from the command line"
)
parser
.
add_option
(
"-v"
,
"--verbose"
,
action
=
"store_true"
,
dest
=
"verbose"
,
default
=
False
,
help
=
"detailed output"
)
parser
.
add_option
(
"-d"
,
"--debug"
,
action
=
"store_true"
,
default
=
True
)
parser
.
add_option
(
"-n"
,
"--dry-run"
,
action
=
"store_true"
,
default
=
False
,
help
=
"do not perform any action, just show what
\
would be done"
)
(
options
,
args
)
=
parser
.
parse_args
()
self
.
parser
=
parser
try
:
self
.
cmd
=
args
[
0
]
self
.
args
=
args
[
1
:]
self
.
options
=
options
except
IndexError
:
print
usage
sys
.
exit
(
1
)
self
.
authInfo
=
None
self
.
checkAuthInfo
()
def
checkAuthInfo
(
self
):
username
=
self
.
options
.
username
password
=
self
.
options
.
password
if
not
username
and
not
password
:
return
# No authentication
elif
username
and
password
:
self
.
authInfo
=
(
username
,
password
)
return
# TODO: yapılandırma dosyasını da kontrol et. Belki orada
# tanımlanmıştır?
if
username
and
self
.
options
.
getpass
:
from
getpass
import
getpass
password
=
getpass
(
"Password: "
)
self
.
authInfo
=
(
username
,
password
)
return
# FIX: her komut için ayrı help
def
help
(
self
,
command
=
""
):
if
not
self
.
args
:
print
usage
return
self
.
parser
.
print_help
()
def
install
(
self
):
if
not
self
.
args
:
self
.
help
(
"install"
)
for
arg
in
self
.
args
:
installhelper
.
install
(
arg
)
def
build
(
self
):
if
not
self
.
args
:
self
.
help
(
"build"
)
for
arg
in
self
.
args
:
buildhelper
.
build
(
arg
,
self
.
authInfo
)
def
updateindex
(
self
):
"""Update the repos db with the given index file (pisi-index.xml)"""
if
len
(
self
.
args
)
!=
1
:
self
.
help
(
"updateindex"
)
indexfile
=
self
.
args
[
0
]
indexhelper
.
updateindex
(
indexfile
)
def
runCommand
(
self
):
commands
=
{
"help"
:
self
.
help
,
"install"
:
self
.
install
,
"build"
:
self
.
build
,
"updateindex"
:
self
.
updateindex
}
for
key
in
commands
.
keys
():
if
key
==
self
.
cmd
:
commands
[
key
]()
break
if
__name__
==
"__main__"
:
cli
=
PisiCLI
()
cli
.
runCommand
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment