Commit 2e44f299 authored by Leo Iannacone's avatar Leo Iannacone

get files, debs and archives

parent a5efa1c8
...@@ -56,11 +56,27 @@ debomatic_sender = { ...@@ -56,11 +56,27 @@ debomatic_sender = {
package: function (socket, package_info) { package: function (socket, package_info) {
package_path = path.join(BASE_DIR, package_info.distribution, 'pool', package_info.package + "_" + package_info.version); package_path = path.join(BASE_DIR, package_info.distribution, 'pool', package_info.package + "_" + package_info.version);
get_files_list(package_path, false, function(files) { get_files_list(package_path, false, function(files) {
result = [] package_info.files = []
package_info.debs = []
package_info.archives = []
files.forEach(function (f) { files.forEach(function (f) {
result.push(f); extension = f.split('.').pop();
if (extension == "deb" || extension == "ddeb")
package_info.debs.push(f);
else if (f.indexOf('.tar') >= 0) {
archive = {}
archive.name = f
archive.path = path.join(package_path, f)
package_info.archives.push(archive)
}
else {
file = {}
file.name = f
file.path = path.join(package_path, f)
file.label = extension
package_info.files.push(file)
}
}); });
package_info.files = result;
socket.emit('package-files', package_info); socket.emit('package-files', package_info);
}); });
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
package = data.package package = data.package
version = data.version version = data.version
data.files.forEach(function (f){ data.files.forEach(function (f){
$('#files').append('<li><a href="#' + distro + "/" + package + "/" +version +'/'+ f +'">'+ f + '</li>'); $('#files').append('<li><a href="#' + distro + "/" + package + "/" +version +'/'+ f.name +'">'+ f.label + '</li>');
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment