Mercurial > prosody-modules
changeset 291:94fab3c0a7aa
mod_admin_web: replace get_deps.lua with a (working) get_deps.sh
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Thu, 23 Dec 2010 20:00:34 +0100 |
parents | ee416b285802 |
children | a9e69088e678 |
files | mod_admin_web/admin_web/get_deps.lua mod_admin_web/admin_web/get_deps.sh |
diffstat | 2 files changed, 8 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_admin_web/admin_web/get_deps.lua Wed Dec 22 20:24:20 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -#!/usr/bin/env lua - -files = { - ["www_files/strophejs.tar.gz"] = "http://download.github.com/metajack-strophejs-release-1.0-0-g1581b37.tar.gz"; - ["www_files/js/jquery-1.4.4.min.js"] = "http://code.jquery.com/jquery-1.4.4.min.js"; -} - -function fetch(url) - local http = require "socket.http"; - local body, status = http.request(url); - if status == 200 then - return body; - end - return false, "HTTP status code: "..tostring(status); -end - -for filename, url in pairs(files) do - file = io.open(filename, "w+"); - data, error = fetch(url); - if data then - file:write(data); - else - print("Error: " .. error); - end - file:close(); -end - -os.execute("cd www_files && tar xzf strophejs.tar.gz"); -os.execute("cd www_files/metajack-strophejs-3ada7f5 && make strophe.js && cp strophe.js ../js/strophe.js"); -os.execute("rm -r www_files/strophejs.tar.gz www_files/metajack-strophejs-3ada7f5");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mod_admin_web/admin_web/get_deps.sh Thu Dec 23 20:00:34 2010 +0100 @@ -0,0 +1,8 @@ +#!/bin/sh +cd www_files/js +wget http://code.jquery.com/jquery-1.4.4.min.js +git clone git://github.com/metajack/strophejs.git strophejs +cd strophejs +make strophe.js && cp strophe.js ../strophe.js +cd .. +rm -rf strophejs