anchor.diff:    PATH     :   $LUA_BINDIR
     PATHEXT  :   .LUA
   LuaRocks;
  -  PATH     :   $FULL_PREFIX
  -  LUA_PATH :   $FULL_PREFIX\lua\?.lua;$FULL_PREFIX\lua\?\init.lua
  +  PATH     :   $PREFIX
  +  LUA_PATH :   $PREFIX\lua\?.lua;$PREFIX\lua\?\init.lua
   Local user rocktree (Note: %APPDATA% is user dependent);
     PATH     :   %APPDATA%\LuaRocks\bin
     LUA_PATH :   %APPDATA%\LuaRocks\share\lua\$LUA_VERSION\?.lua;%APPDATA%\LuaRocks\share\lua\$LUA_VERSION\?\init.lua
  
positive.code: -- Install LuaRocks files
  -- ***********************************************************
  
  if exists(vars.FULL_PREFIX) then
    if not FORCE then
      die(S"$FULL_PREFIX exists. Use /F to force removal and reinstallation.")
    else
      backup_config_files()
      print(S"Removing $FULL_PREFIX...")
      exec(S[[RD /S /Q "$FULL_PREFIX"]])
      print()
    end
  end
  
  print(S"Installing LuaRocks in $FULL_PREFIX...")
  if not exists(vars.BINDIR) then
  	if not mkdir(vars.BINDIR) then
  		die()
  
negative.code:     temppath = os.getenv("temp").."\\LR-config-backup-"..tostring(math.random(10000))
      if exists(temppath) then temppath = nil end
    end
    vars.CONFBACKUPDIR = temppath
    mkdir(vars.CONFBACKUPDIR)
    exec(S[[COPY "$PREFIX\config*.*" "$CONFBACKUPDIR" >NUL]])
    exec(S[[COPY "$PREFIX\lua\luarocks\site_config*.*" "$CONFBACKUPDIR" >NUL]])
  end
  
  -- restore previously backed up config files
  local function restore_config_files()
    if not vars.CONFBACKUPDIR then return end -- there is no backup to restore
    exec(S[[COPY "$CONFBACKUPDIR\config*.*" "$PREFIX" >NUL]])
    exec(S[[COPY "$CONFBACKUPDIR\site_config*.*" "$PREFIX\lua\luarocks" >NUL]])
    -- cleanup
    exec(S[[RD /S /Q "$CONFBACKUPDIR"]])
    vars.CONFBACKUPDIR = nil
  