X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=tools%2Fejabberd2prosody.lua;h=33f60c99bfad0ffeebf8a68972d4e4a3dd318918;hb=10904eb0553bd5e6efadbd8ab04ed77c49aa03b9;hp=60cb8b19c9c50015337d4c04de1cb08a919a4e6d;hpb=a000066208193b970e0f28942fc786294bb46858;p=prosody.git diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua old mode 100644 new mode 100755 index 60cb8b19..33f60c99 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -1,3 +1,24 @@ +#!/usr/bin/env lua +-- Prosody IM v0.1 +-- Copyright (C) 2008 Matthew Wild +-- Copyright (C) 2008 Waqas Hussain +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation; either version 2 +-- of the License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +-- + + require "erlparse"; require "serialize"; @@ -9,9 +30,10 @@ local dm = require "util.datamanager" local data_path = "data"; dm.set_data_path(data_path); +local path_separator = "/"; if os.getenv("WINDIR") then path_separator = "\\" end local _mkdir = {} function mkdir(path) - path = path:gsub("/", "\\"); + path = path:gsub("/", path_separator); --print("mkdir",path); local x = io.popen("mkdir "..path.." 2>&1"):read("*a"); end