
import os
import sys
import platform

from os.path import isfile, join

DRAKAR_PATH = os.environ.get('DRAKAR', '/mnt/drakar')

def get_archive(filename):
    path = join(DRAKAR_PATH, 'archives', sys.platform + '-' + platform.machine(), filename)
    print path
    

get_archive('foo')

@@ -1,13 +1,12 @@
-%0A
 import os%0Aim
@@ -118,16 +118,193 @@
 drakar')
+%0ASYSTEM = sys.platform + '-' + platform.machine()%0A%0Asources = %7B%0A    'linux2-x86_64/processing-2.1-linux64.tgz': 'http://download.processing.org/processing-2.1-linux64.tgz',%0A    %7D
 %0A%0Adef ge
@@ -328,16 +328,30 @@
 e):%0A    
+%0A    archives_
 path = j
@@ -383,47 +383,265 @@
 s', 
-sys.platform + '-' + platform.machine()
+SYSTEM)%0A    # =%3E /mnt/drakar/archives/linux2-x86_64%0A    %0A    file_path = join(archives_path, filename)%0A    # =%3E /mnt/drakar/archives/linux2-x86_64/filename.foo%0A    %0A    if not isfile(file_path)%0A        here = os.getcwd()%0A        source = sources%5Bjoin(SYSTEM
 , fi
@@ -651,45 +651,289 @@
 ame)
+%5D
 %0A    
-print path%0A    %0A%0Aget_archive('foo
+    %0A        os.chdir(archives_path)%0A        os.system('wget ' + source)%0A        os.chdir(here)%0A    %0A    if isfile(file_path):%0A        return file_path%0A    else:%0A        raise IOError(%22Could not obtain '%7B%7D' in Drakar%22.format(filename))%0A%0Aget_archive('processing-2.1-linux64.tgz
 ')%0A

Update drakar.py