summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-12-25 12:41:43 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-12-25 12:41:43 +0000
commit3bda2a3500678074ec0e036d4e1e8bcb711f3c9c (patch)
treec885c074a05118edfac74fc9ffa3836cbe9670d0
parentDon't show any use flags when using --quiet. (diff)
downloadportage-multirepo-3bda2a3500678074ec0e036d4e1e8bcb711f3c9c.tar.gz
portage-multirepo-3bda2a3500678074ec0e036d4e1e8bcb711f3c9c.tar.bz2
portage-multirepo-3bda2a3500678074ec0e036d4e1e8bcb711f3c9c.zip
Make dohtml return 1 when a passed file/dir doesn't exist.
svn path=/main/trunk/; revision=2472
-rwxr-xr-xbin/dohtml15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/dohtml b/bin/dohtml
index 963f4465..5162ba9b 100755
--- a/bin/dohtml
+++ b/bin/dohtml
@@ -63,6 +63,10 @@ def install(basename, dirname, options, prefix=""):
pfx = basename
if prefix: pfx = prefix + "/" + pfx
install(i, dirname, options, pfx)
+ else:
+ return False
+ return True
+
class OptionsClass:
def __init__(self):
@@ -150,10 +154,19 @@ def main():
print "Document prefix : '" + options.doc_prefix + "'"
print "Allowed files :", options.allowed_files
+ success = True
+
for x in args:
basename = os.path.basename(x)
dirname = os.path.dirname(x)
- install(basename, dirname, options)
+ success = success and install(basename, dirname, options)
+
+ if success:
+ retcode = 0
+ else:
+ retcode = 1
+
+ sys.exit(retcode)
if __name__ == "__main__":
main()