Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fixing broken commandline
  • Loading branch information
ahmedifhaam committed Aug 12, 2018
1 parent 5a9c9b5 commit a208849eeda3e2580006994408671ec53ee22208
Showing 3 changed files with 40 additions and 1 deletion.
@@ -0,0 +1,35 @@
import sys
import os
import json

def main(argv=None):
if len(argv) == 0:
print "No Repo details to dump"
sys.exit()

if os.getenv("DRAT_HOME")==None:
print "Please add DRAT_HOME environment variable and try again";
sys.exit()

default_repo_file_url = os.getenv("DRAT_HOME") + "/conf/repo.default.txt"
with open(default_repo_file_url,'rb')as repoFile:
data = ''
for line in repoFile:
data+=line
rep = eval(data)

reponame = os.path.basename(os.path.normpath(argv[0]))

rep["id"] = os.path.normpath(argv[0])
rep["repo"] = os.path.normpath(argv[0])
rep["name"] = reponame

outputfile = os.getenv("DRAT_HOME") + "/data/repo"
file = open(outputfile,"w")
file.write(json.dumps(rep))
file.close()

print rep

if __name__ == "__main__":
main(sys.argv[1:])
@@ -59,7 +59,10 @@ function crawl {
PRODUCT_PATH=$1
fi
pushd $DRAT_HOME/crawler/bin >> $DRAT_HOME/logs/drat.log 2>&1


python dump_repo_details.py $PRODUCT_PATH


./crawler_launcher --operation --metPC --metExtractorConfig \
$DRAT_HOME/extractors/code/default.cpr.conf --metExtractor org.apache.oodt.cas.metadata.extractors.CopyAndRewriteExtractor \
--filemgrUrl $FILEMGR_URL --clientTransferer org.apache.oodt.cas.filemgr.datatransfer.InPlaceDataTransferFactory \
@@ -0,0 +1 @@
{"id":"","repo":"","name":"","loc_url":"http://drat.apache.org/#","description":"DRAT : Command line","type":"project"}

0 comments on commit a208849

Please sign in to comment.