diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2014-12-10 08:10:12 +0100 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-12-10 08:10:12 +0100 | 
| commit | 27a805594949ffb973d0055380cb354b043e1d0f (patch) | |
| tree | 2b962781454ade6b34386004a7cff888c46c6f08 /scripts/mkimport | |
| parent | 9a778b19fbfd69dc7bee8b88b8640ebf2451047e (diff) | |
| download | luaotfload-27a805594949ffb973d0055380cb354b043e1d0f.tar.gz | |
[import] add stub for usage message
Diffstat (limited to 'scripts/mkimport')
| -rw-r--r-- | scripts/mkimport | 22 | 
1 files changed, 17 insertions, 5 deletions
diff --git a/scripts/mkimport b/scripts/mkimport index a748459..651ff04 100644 --- a/scripts/mkimport +++ b/scripts/mkimport @@ -438,7 +438,7 @@ local import = function (arg)    return 0  end --[[ [local import = function (arg)] ]] -local tell = function (arg) +local search = function (arg)    local target = arg[2]    if not target then die "no filename given" end @@ -462,18 +462,30 @@ local tell = function (arg)      end    end -  if not look_for then -    die ("file %s not found in any of the search locations", target) -  end +::fail:: +  if not look_for then return end  ::found::    status ("found file %s at %s", target, look_for) +  return look_for +end + +local tell = function (target) +  local location = search (target) +  if not location then +    die ("file %s not found in any of the search locations", target) +  end +end + +local help = function () +  die "not implemented :/"  end  local job_kind = table.mirrored {    news   = news,    import = import,    tell   = tell, +  help   = help,  }  ------------------------------------------------------------------------------- @@ -490,7 +502,7 @@ end  -------------------------------------------------------------------------------  local main = function () -  local job = arg[1] or "news" +  local job = arg[1] or "help"    local runner = check_job (job)    return runner(arg)  end  | 
