summary refs log tree commit diff stats
path: root/lib/pure/osproc.nim
Commit message (Expand)AuthorAgeFilesLines
* Fixed osproc.terminate for posix and improved some other osproc posix functions.dom962011-08-031-10/+19
* doc improvements; added lazarus exampleAraq2011-07-241-3/+3
* bugfix: proper cache for generic instantiationsAraq2011-07-211-12/+0
* preparations for 0.8.12Araq2011-07-101-4/+6
* bugfix: 'set' overloadable; further steps for multi threading supportAraq2011-07-081-1/+21
* implemented write access to s[i] for macrosAraq2011-06-211-2/+2
* got rid of unsound co/contravariance in procvarsAraq2011-06-171-5/+7
* bugfix second attempt: osprocAraq2011-05-221-0/+1
* bugfix stderr osprocAraq2011-05-221-7/+4
* Added a helpful iterator to redis. Fixed some issues with stderr in osproc. F...dom962011-05-221-2/+3
* bugfix: don't change OSError()'s behaviourAraq2011-05-081-4/+4
* select() for processes; copyDir() for os.dom962011-05-071-4/+78
* bugfix: osproc compiles under windows againAraq2011-01-071-1/+1
* inlining of the write barrier for dllsAndreas Rumpf2010-08-081-38/+31
* c2nim tool addedAndreas Rumpf2010-07-211-1/+1
* Integrating my changes, mostly minor/cosmetic fixes; plus a big Windows lib u...PhiLho2010-05-211-11/+11
* fixed pango/pangoutils new wrappersAndreas Rumpf2010-02-261-0/+0
* continued work on html/xmlparserrumpf_a@web.de2010-02-141-0/+0
* devel of web frontendrumpf_a@web.de2010-01-101-2/+2
* version 0.8.2rumpf_a@web.de2009-10-211-83/+183
* implemented multi methodsAndreas Rumpf2009-09-231-23/+39
* added tools and web dirsAndreas Rumpf2009-09-151-0/+0
* overload resolution for proc varsAndreas Rumpf2009-06-241-3/+3
* version0.7.10Andreas Rumpf2009-06-081-0/+427
800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Trim C compiler installation to a minimum

import strutils, os

proc newName(f: string): string =
  var (dir, name, ext) = splitFile(f)
  return dir / "trim_" & name & ext

proc walker(dir: string) = 
  for kind, path in walkDir(dir):
    case kind
    of pcFile:
      moveFile(dest=newName(path), source=path)
      # test if installation still works:
      if execShellCmd(r"nimrod c --force_build tests\tlastmod") == 0:
        echo "Optional: ", path
        removeFile(newName(path))
      else:
        echo "Required: ", path
        # copy back:
        moveFile(path, newName(path))
    of pcDir:
      walker(path)
    else: nil

if paramCount() == 1:
  walker(paramStr(1))
else:
  quit "Usage: trimcc c_compiler_directory"